Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

1 Answer 1

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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.