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 have apache 2.2 installed on windows vista. Currently apache responds to http://localhost/ with its default "it works" page. My computer has multiple IPs on it and I want it to listen on a particular IP. How can I do this?

share|improve this question

migrated from stackoverflow.com Jan 24 '11 at 15:42

This question came from our site for professional and enthusiast programmers.

3  
I'd dearly love to know why you've tagged this question "recapcha". –  middaparka Jan 24 '11 at 15:24
add comment

2 Answers

Bind Apache's server port to 0.0.0.0 address.

In your Apache configuration use:

Listen 0.0.0.0:80

Or just:

Listen 80

Make sure you restart apache's daemon after changing this, and that your Windows Firewall is not preventing you from accessing port 80 through an external network interface.

share|improve this answer
3  
Note that using 'Listen 0.0.0.0:80' or 'Listen 80' will cause Apache to listen and respond on all IP addresses your system is using. If you want it to listen on a single IP, replace 0.0.0.0 with that IP. –  Sean Staats Jan 24 '11 at 15:54
add comment

If you want to run Apache and IIS on the same machine, this is also possible.

Basically you have to tell the HTTP.SYS the IP addresses that you want it to listened to. These are the IP addresses that you do not want to use with Apache.

share|improve this answer
add comment

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.