DEV Community

Discussion on: Linux Essentials: The Singular Six

Collapse
adityamitra profile image
Aditya Mitra

Someone asked me this:

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

Collapse
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. httpd.apache.org/docs/2.4/>

Collapse
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: digitalocean.com/community/tutoria...