Forum Moderators: phranque

Message Too Old, No Replies

Listen problem

         

poppe

6:54 pm on Jul 6, 2009 (gmt 0)

10+ Year Member



Hi

The original configuration file has been setup to listen all connections for port 80. I want my server to listen only for one computer ip, for example:

listen 12.34.56.78:80

If i make this change, and comment out the original line to listen for all ip's, i am unable to start the server.

When trying to start apache service it says "failed to start".

How can i configure the server to listen incoming requests from only ip?

BR,
POPPE

janharders

7:03 pm on Jul 6, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I'm not sure, but it might be that Listen is case-sensitive.
If it does not solve the problem, look at the errorlog (often found in /var/log/apache2/error.log) to see why it fails.

Caterham

9:00 pm on Jul 6, 2009 (gmt 0)

10+ Year Member



All directives are merged case-intensive (
strcasecmp()
), so you could use lIsTen, too, if you like.

I want my server to listen only for one computer ip, for example:

listen 12.34.56.78:80

That is the IP of the network adapter of the server apache is installed on? Because that is, what the listen directive requires.

How can i configure the server to listen incoming requests from only ip?

That sounds like access control, see mod_authz_host [httpd.apache.org] and Access Control how-to [httpd.apache.org].