I'm trying to set up a web server for my first time. I'm running Ubuntu 12.04.1 and i've installed LAMP. I have also set up a static IP for the server, and reserved it in the router settings. So far so good.

Now to the problem. I forwarded port 80 to the servers IP address, but the server is not responding to any connections. If i try to access the public IP through a webbrowser when the port is NOT forwarded, i get an error saying "Could not connect to host". If i do forward the port i get a timeout error. Correct me if i'm wrong, but that should mean the port is being forwarded to the server, but what happens after that i don't know. Am i right? And any suggestions about how to troubleshoot this?

EDIT: I should also mention that Apache does in fact work and if i type in in a browser, the page does indeed load. I just can't access it from the outside world.

  • Look into /var/log/apache2/ access and error logs. – carandraug Sep 1 '12 at 22:37

I found the problem, and in fact, there was no problem. I just couldn't access the website through my public IP from my own IP, I could only access it from other IPs. I'm guessing there is some security block in my router that prevents it. To fix it I set up a virtual server instead of forwarding a port (as recommended in the D-link forums). The result is the same; the port is forwarded to the server, but now I can also access it from the network. It was as simple as that.

| improve this answer | |

You have to use an outside IP address to be able to check the forwarding. Forwarding on most routers is only for incoming traffic, not for stuff that originates on the inside. You can use tor to make sure your requests come in from outside.

| 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.