Page 1 of 1

Apache listen remote

PostPosted: 27. November 2011 11:45
by kmitnick
Hi all,

I want open listen for all my LAN pc. How can I do it?

Now, I can access my webapp only using localhost.

Help me please.

Re: Apache listen remote

PostPosted: 27. November 2011 12:45
by Nobbie
Simply remove all LISTEN directives in your Apache configuratian (httpd.conf). The default for Apache is to listen on ALL IPs and ALL Ports.

P.S.: Oops! I just read this note in http://httpd.apache.org/docs/2.1/en/mod ... tml#listen

If it is not in the config file, the server will fail to start. This is a change from previous versions of Apache.


Sorry, I didn't know that the default behaviour has been changed. As it looks, there is no other way than specifying LISTEN directives for each IP, which is assigned to your server (still not very many).

P.P.S.: Maybe I dont understand your question correctly. Apache *cannot* LISTEN to all PCs of your LAN (thats not the way Apache/LISTEN works); Apache can only LISTEN to IPs which are assigned to the server where Apache is installed. All incoming requests to this/these IP(s) are recognized.

Re: Apache listen remote

PostPosted: 27. November 2011 13:00
by kmitnick
I have setted "Listen 0.0.0.0:80" but remote machine can't view my webapps published on my apache! only localhost can view them!

Help

Re: Apache listen remote

PostPosted: 27. November 2011 15:15
by Nobbie
Why dont you read documentation, i.e. the link i provided to you?

a) You should use "LISTEN 80" and not "LISTEN 0.0.0.0:80", Restart Apache after changing configuration

b) What do you enter in remote browser?

Re: Apache listen remote

PostPosted: 27. November 2011 23:08
by Sharley
@kmitnick

You say you are using XAMPP 1.7 version, is that correct?
Check by looking at the first line in the readme_en.txt file in the xampp folder.

In older versions of XAMPP there are no restrictions on access from the LAN if you type the IP address of the computer that has XAMPP installed in the browser of the computer on the LAN.

Try changing the Listen directive to
Code: Select all
Listen *.80
Save the file and restart Apache.