Sign up ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

One CentOS box comes with 2 LAN cards, one is for intranet (, one is for public access ( How can I config httpd.conf such that traffics from each IP will access to a different document root? i.e.: traffic from intranet -> /var/www/html/intranet/, traffic from the web -> /var/www/html/internet/

share|improve this question

1 Answer 1

up vote 0 down vote accepted

You want a virtual host (Apache Virtual Host Documents). A virtual host can do exactly what your describing (assuming your using apache httpd) - this information is put into your httpd.conf

An example, modified from their website:

DocumentRoot /var/www/html/intranet
ServerName www.domain.tld

DocumentRoot /var/www/html/internet
ServerName www.domain.tld

There are many more options, such as custom logs and such, please refer to the documentation.

share|improve this answer

Your Answer


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.