Tell me more ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm trying to start an instance of Apache 2.2 server with a fairly-close-to-standard configuration file. I made one small change because I want Apache to serve a single XML file separately from everything else it does, purely for testing on my local machine. The change is that I inserted this into httpd.conf:

# Based on http://httpd.apache.org/docs/2.2/vhosts/examples.html

Listen 10.11.12.13:85

NameVirtualHost 10.11.12.13:85

<VirtualHost 10.11.12.13:85>
DocumentRoot "C:\foo\bar"
ServerName www.MyCompanyMyProjectFooBarTestURL.com
</VirtualHost>

Attempting to start Apache resulted in this:

(OS 10049)The requested address is not valid in its context. : make_sock: could not bind to address 10.11.12.13:85
no listening sockets available, shutting down
Unable to open logs

No instances of Apache are running. Nothing is using port 85 (or 80 or 8080). There's nothing special about 10.11.12.13:85; I just figured that was an IP that wouldn't interfere with anything.

What does this error mean, and how can I resolve it?

share|improve this question

2 Answers

Make sure that the IP is configured on an network interface that is UP.

To add an IP to a network interface on Windows 7 you can follow the HOWTO from http://www.pctips3000.com/how-to-assign-more-than-one-ip-address-to-one-lan-in-windows-7/

If you have DHCP, then you might need to do some Registry tricks like: http://www.petri.co.il/configure_tcp_ip_to_use_dhcp_and_a_static_ip_address_at_the_same_time.htm or just use static IP allocation.

share|improve this answer
Could you elaborate? I don't understand this. (If it's not obvious, this is my first time trying to do anything with Apache.) – Lord Torgamus Sep 21 '11 at 20:00
@LordTorgamus Is that IP address configured on the system, not just in Apache? Apache can't bind to a port on an IP that the system doesn't have configured anywhere. – Shane Madden Sep 21 '11 at 20:30
Hm, no. I didn't realize I'd need to configure it elsewhere just to use it locally. Could you give me a search term to start with? I'm getting a lot of "set up your home router!" results in Google at the moment. @ShaneMadden – Lord Torgamus Sep 21 '11 at 20:41

There could be reason the IP address you are pointing is generic one. For example:-10.1.1.233:443 And you get error >>> (OS 10049)The requested address is not valid in its context. : make_sock: could not bind to address 10.1.1.233:443

comment the line in httpd-ssl.conf and start the Apache

share|improve this answer

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.