I want to setup my apache2 to do the following.

Listen for connections on example.com:80 and answer to any host

Listen to connections on foo.example.com:80 and only answer to localhost

Is this possible?

1 Answer 1


Sure, don't you edit your httpd.conf file and just add

Order allow,deny
Allow from all

in the virtualhost responsible for example.com:80 and

Order allow,deny
Allow from

in the one responsible for foo.example.com:80?

Or am I missing something?

  • I take it it didn't work?
    – brice
    Feb 21, 2010 at 15:37

You must log in to answer this question.

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