Want to move DocumentRoot

4 posts / 0 new
Last post
#1 Wed, 05/07/2008 - 22:49
RogerWeiss

Want to move DocumentRoot

I would like tomove the DocumentRoot for newly created virtual servers from: ${HOME}/public_html to: ${HOME}/www/public_html

I edited Server Templates; Default Settings; Apache Website DocumentRoot setting to be: ${HOME}/www/public_html

Yet when I create a virtual server it still creates the apache folders under /home/USER/ e.g. /home/webadmin/cgi-bin /home/webadmin/homes /home/webadmin/logs /home/webadmin/public_html /home/webadmin/ssl.cert /home/webadmin/ssl.key

What do I have to change to get the document root to be where I want it?

Also when I create the virtual server I get: .. Webalizer reporting failed! : Failed to open /home/activese/www/public_html/stats/.htaccess for writing : Bad file descriptor at ../web-lib-funcs.pl line 980. At least something is trying to do the right thing. :-)

Thanks, Roger

Mon, 06/02/2008 - 06:50
Hal9000

i get the same error under some other circumstances... while importing domains from plesk.
i think the problem is that the stats folder is not owned by the activese user, so apache fails to write there.
hal

Tue, 02/13/2018 - 03:43
m

Updating both menus,
Virtualmin / Services/Confgure Site/Edit configurations/Edit Directives -> update the terminal

as well as

Virtualmin / Services/Confgure Site/Configure website for ssl/Edit Directives -> update the terminal

If both menus' front page paths were not updated, update them manually.

ReBoot the server or start the httpd and ssl services from Webmin/System/Bootup and Shutdown I reboot. Check that you can go to the site with a browser (htppd and htpps). If it does not work check the var/log/virtualmim/ site error file to see the path it is trying to go to.

If it still trying the old path try updating this file. (the file name number will be different)

/etc/webmin/virtual-server/domains/151841758632130 Change My changes look like this public_html_dir=public_html to public_html_dir=example.com/data/www/example public_html_path=/home/views/public_html to public_html_path=/home/example/example.com/data/www/example

The reason you need to update Edit Directives in both menus is because httpd goes to one port (80) and htpps goes to another (400 something). In theory we may be able to set two roots, one for htppd and the other to htpps, but I did not try.

MikeVR

Wed, 02/14/2018 - 07:36
Jfro

Double post from me but if default for new creating VServer

Not sure if this is what you need / want.

Virtualmin > Systemsettings > Virtualmin Configuration > Default for new domains > Home directory Base

??? ;)

Topic locked