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?

link|improve this question

feedback

migrated from superuser.com Feb 18 '10 at 1:14

This question came from our site for computer enthusiasts and power users.

1 Answer

up vote 1 down vote accepted

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 127.0.0.1

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

Or am I missing something?

link|improve this answer
I'll give this a shot later tonight, thanks :) – macek Feb 18 '10 at 15:37
I take it it didn't work? – brice Feb 21 '10 at 15:37
feedback

Your Answer

 
or
required, but never shown

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