Answer the question
In order to leave comments, you need to log in
How to change apache working folder?
There is an Ubuntu 14.04.3 LTS server running apache. I'm trying to change the home folder of sites.
I create a config file like this:
<VirtualHost *:80>
DocumentRoot "/web/site1/public_html/www/"
ServerName "test1.ru"
ErrorLog /web/site1/error_log
CustomLog /web/site1/access_log combined
AssignUserId site1 site1
</VirtualHost>
drwxr-xr-- 4 site1 site1 4096 Nov 24 19:18 site1
Answer the question
In order to leave comments, you need to log in
Check if the path is correct and if the user under which the server is running (most likely www-data) has access to this directory.
Try adding a directive
<Directory /web/site1/public_html/www/>
AllowOverride All
</Directory>
<VirtualHost *:80>
DocumentRoot "/web/site1/public_html/www/"
ServerName "test1.ru"
ErrorLog /web/site1/error_log
CustomLog /web/site1/access_log combined
AssignUserId site1 site1
<Directory /web/site1/public_html/www/>
AllowOverride All
</Directory>
</VirtualHost>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question