Editing http.conf

2 posts / 0 new
Last post
#1 Mon, 02/12/2018 - 04:25
m

Editing http.conf

How does Virtualmin synchronize with Apache configurations? It shows updated path correctly but Apache does not seems to follow. I needed to update the documetroot. I did it by going to Virtualmin Services -> Configure Website / Path and updating it with a new path, then saved it and reboot the server.

I then checked the httpd.conf and the documentroot for that domain was updated with the new path (as expected). I checked Virtualmin Services -> Configure Website / Path and it shows the new path (as expected).

However. trying to access the site produces an error in

vars/log/virtualmin/domain.com_error_log that shows the old default path.

AH01276: Cannot serve directory /home/user/public_html/: No matching DirectoryIndex

It is a new installation on top of Centos 7. I wonder if there a duplicity where is it?

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

OK it took 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

Topic locked