1

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?

2

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;
| 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
2

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

| improve this answer | |
0

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)

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.