Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Not sure where to post this really, as it could be PHP specific or more for Superuser.

I've just moved my testing environment into a VirtualBox running Ubuntu Server 12.04. Works like a dream apart from one niggle; the Document root in PHP scripts points to /var/www/ and not /var/www/site1/.

Is there a way round this? Apart from amending hundreds of pages of include $_SERVER['DOCUMENT_ROOT'] .

I have multiple sites all running through /sitesavailable/ each one is configured as per default, only with the DocumentRoot set to /var/www/site1, /var/www/site2, etc.

Now, this is where I differed from my previous configurations on LAMP servers. I decided to run group permissions on the /var/www/ folder and handle everything in this one semi-open location – instead of holding the sites in ~user/home/sites/ – as this is only a local development environment. Therefore there are no symlinks or public_html files; just the directories for each site.

Perhaps, I should change this as per previous configurations to a different directory, in user/home/ – as this worked. However, I'm as stubborn. Surely, there is a work-around and I'm just missing the fundamental thing... knowledge... can anyone help?

share|improve this question
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.