Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to modify the default directory for Apache from /var/www to /var/www/public_html, and I can't find any resources specifically on how to do this. The httpd.conf and apache.conf files are empty. How would I go about this?

share|improve this question
    
Is DocumentRoot - Apache HTTP Server documentation what you're looking for? – slhck Aug 4 '12 at 22:27
up vote 0 down vote accepted

In some apache builds, the default site is defined, not in the httpd.conf file, but in /etc/apache2/sites-available/default. Take a look there.

And this question over at SO should get you moving in the right direction. The answer over there offers a basic virtualhost definition as well as a couple other things necessary to configure a site defined in sites-available

<VirtualHost *:80>
    ServerName www.mywebserver.com
    DocumentRoot /home/www/public_html/
    <Directory /home/www/public_html/>
        Options None
        Order deny,allow
        Allow from all
    </Directory>
</VirtualHost>
share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .