How do I change the document root of a Linux Apache server?

Posted by Daryl Spitzer on Server Fault See other posts from Server Fault or by Daryl Spitzer
Published on 2010-04-26T19:28:46Z Indexed on 2010/04/26 19:33 UTC
Read the original article Hit count: 335

Filed under:
|
|

I'm trying to learn how to configure an Apache HTTP server (with which I have no experience) someone else has setup in a VM running Ubuntu 8.04.

I know the server is running, since I get "<html><body><h1>It works!</h1></body></html>" when I go to http://1.2.3.4/ (where 1.2.3.4 is the VM's IP number).

I found apache2.conf and httpd.conf (among other files) in /etc/apache2/. httpd.conf is empty.

I tried adding DocumentRoot "/home/username/temp" into /etc/apache2/httpd.conf and put some simple HTML in /home/username/temp/index.html. But when I reload http://1.2.3.4/ there's no change.

Do I need to restart httpd to get it to accept the change to DocumentRoot?

© Server Fault or respective owner

Related posts about apache

Related posts about ubuntu