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 a FreeBSD8 server, and VPN connection to my ISP. I use mpd5 and it works fine.
Also I have an Apache server whch works fine, if I start it manually, after VPN is get up. But when I add it to rc.conf autostart, it fail to start, saying

(49) can't assign requested address: make_sock could not bind to address

I suppose it's because VPN isn't up yet and no IP address assigned to the interface which i set in the Listen directive in the httpd.conf. If i set Listen to the existing 127.0.0.1, it fail to serve wan requests.

Is there a solution, either to delay apache autostart or configure it some different?

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

IP address is optional. Just set something like

Listen 80

And it will bind to port 80 on all interfaces.

http://httpd.apache.org/docs/1.3/bind.html

share|improve this answer
    
Oh, thanks! I am just blind. I tried this before, but it didn't work because I havent /etc/hosts record yet, and it failed for another reason. I just have to be more persistent :) Thanks again! –  Col. Shrapnel Mar 13 '10 at 14:36
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.