Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question

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

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

1 Answer 1

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?

share|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

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.