Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've been stuck in this issue: I have a PHP web page stored in my linux server, the problem is I can only access this web page when I am connected in the same LAN where the server is, but when I try access remotely I just can´t do it. What have I been doing wrong possibly?.

Another details about the server:

Installed Apache2
Installed PHP5
Installed MySQL
DynDNS domain
share|improve this question

migrated from May 30 '12 at 20:02

This question came from our site for professional and enthusiast programmers.

Does your server have an external IP address? – lanzz May 29 '12 at 15:07
Does your ISP allow Port 80 to broadcast? – William Isted May 29 '12 at 15:09
What do you mean by "access remotely"? Are you trying to browse to it via a browser? Are you ssh'ing and trying to run it? – jeremyharris May 29 '12 at 15:10
yes, it has an external IP address, and the access to it is from a DynDNS address ( – julio May 29 '12 at 15:14
yes, i'm trying to browse to it via a browser – julio May 29 '12 at 15:17

The server needs to be configured to listen on a network interface that is either:

  • directly connected to the Internet
  • having a suitable port forwarded to it from a machine that is
  • accessible to a proxy server that is

The port you are listening on needs to be accessible (i.e. not blocked by a firewall, either one you control or one your ISP controls).

You then need to know the IP address of that network interface to make the connection to.

share|improve this answer

You need:

  1. A static IP address
  2. Set your router to forward port 80
  3. If needed, put your router in DMZ mode

You then must set up nameservers so you can route your own domain to your server.. otherwise, you'll just have a static IP address.

There is a great site out there that will allow you to use their domain name servers.

I believe another one is The first one is cheaper I think though; it used to be free

share|improve this answer
with dyndns he explicitly does NOT need a static IP – deltree May 29 '12 at 15:18


I had to make several changes in the apache2 configuration in my server linux (Ubuntu server 11.04). Those changes were:

1) Modified the file 'ports.conf' found on /etc/apache2. Replaced this lines:

NameVirtualHost *:80 Listen 80

for this:

NameVirtualHost *:8082 Listen 8082

2)Modified the file '000-default' found in /et/apache2/sites-enabled. Replaced this line:

VirtualHost *:80

for this:

VirtualHost *:8082

note: (I chose this port because I had another application in port 8080)

After this 2 steps, I restarted apache2 server:

sudo /etc/init.d/apache2 restart

Now I can access the server from the LAN and from the Internet. I hope this could help someone else

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.