# Change ${WWWDIR} variable



## ilemur (Mar 16, 2010)

I have dedicated a separate disk /www for my web server. But anytiime i installl a web application from ports it defaults to /usr/local/www... Using PREFIX brings a whole lot of garbage. So is there a way to set ${WWWDIR} (caught it in Makefile) to /www instead of the default one?


----------



## SirDice (Mar 16, 2010)

Set WWWDOCROOT. Or simply `# mount -t nullfs /www /usr/local/www`.


----------



## psycho (Mar 16, 2010)

sir dice answered already


----------



## ilemur (Mar 16, 2010)

sorry for noobing. But how do you set WWWDOCROOT


----------



## SirDice (Mar 16, 2010)

ilemur said:
			
		

> sorry for noobing. But how do you set WWWDOCROOT



Something like [cmd=]make install WWWDOCROOT=/www[/cmd] in the port's directory.

Or for (t)csh:
[cmd=]setenv WWWDOCROOT /www[/cmd]

For (ba)sh:
[cmd=]WWWDOCROOT=/www ; export WWWDOCROOT[/cmd]


----------



## ilemur (Mar 16, 2010)

SirDice said:
			
		

> Something like [cmd=]make install WWWDOCROOT=/www[/cmd] in the port's directory.
> 
> Or for (t)csh:
> [cmd=]setenv WWWDOCROOT /www[/cmd]



Strange but neither is working. It still installs in /usr/local/www/


----------



## ilemur (Mar 16, 2010)

Changing WWWDOCROOT to WWWDIR fixed it. But installed everything in /www/ Instead of /www/portname/


----------



## SirDice (Mar 16, 2010)

Which port?


----------



## ilemur (Mar 16, 2010)

Ampache. Ports tree is fresh


----------



## ilemur (Mar 16, 2010)

Ok i get my mistake.... Last question is the variable saved and used in ports upgrade if i use a command during port insatallation? make install WWWDIR=/www/portname clean


----------



## DutchDaemon (Mar 16, 2010)

Late to the party, but if there's nothing in /usr/local/www, why not symlink it to /www? Or use /usr/local/www as the mountpoint of that separate disk?


----------

