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 problem that I cannot access a web page when using eth0 interface. If I use loopback interface everything works fine.

wget http: //127.0.0.1:8080/app - works ok wget http: //192.168.50.129:8080/app - connection refused.

I'm doing this on the same machine.

Any ideas what might be the problem?

share|improve this question
add comment

3 Answers

up vote 2 down vote accepted

First you should check the Listen directive in your server configuration

   Listen 8080

should listen on all interfaces, port 8080.

In doubt you can specify several times the same directives

  Listen 127.0.0.1:8080
  Listen 192.168.50.129:8080

and restart the server.

If your firewall drops the packets, you wouldn't have connection refused, so I think it is more a web server configuration problem.


If you are using nginx and not apache, check your server section(s) and the same remark applies

  listen 8080;

or

  listen 127.0.0.1:8080;
  listen 192.168.50.129:8080;
share|improve this answer
    
This most likely is the problem.... But I still have to figure out how to make a service listen on some other interface. I need to make Oracle 10g XE listen on that interface. –  markovuksanovic Dec 9 '10 at 17:23
add comment

First check if your webserver is listening on eth0 and not just lo

$ netstat -ntlp

If that is okay then do a telnet on port 8080 to see if the port is open.

$ telnet 192.168.50.129 8080

If the telnet doesn't work check your firewall rules.

$ iptables -L -n

share|improve this answer
add comment

It could be that you have a

Listen 127.0.0.1:8080

in your /etc/apache2/ports.conf?

Or a

<VirtualHost 127.0.0.1:8080>

under your sites configuration (usually /etc/apache2/sites-available/default or analogue)

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.