DEV Community

Discussion on: Linux Essentials: The Singular Six

adityamitra profile image
Aditya Mitra

Someone asked me this:

How can we change the document root of apache webserver to /web directory?

scriptmunkee profile image
Ken Simeon • Edited on

Edit your httpd.conf file located in either /etc/httpd/ or /etc/httpd/conf/ and change the ServerRoot path to your desired destination. Or you can create a non standard file path using the <Directory /> or <VirtualHost />.

See the Apache web server documentation.>

erikaheidi profile image
Erika Heidi Author

Yes! What Ken said. If you would like to create a virtual host instead, I'd recommend this tutorial: