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 want to make my apache 2 development server public to the internet, it is a Django based website.

Here is my apache2 config:

<VirtualHost *:80>
Alias /media /home/user/myproject/statics
Alias /admin_media  /home/myuser/django/Django-1.1.1/django/contrib/admin/media

WSGIScriptAlias / /home/myuser/myproject/
WSGIDaemonProcess myproject user=myuser group=myuser threads=25
WSGIProcessGroup myproject

When I do netstat -lntup

I get:

Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0*               LISTEN      -               
tcp        0      0    *               LISTEN      -               
tcp        0      0 *               LISTEN      -               
tcp6       0      0 :::80                   :::*                    LISTEN      -               
tcp6       0      0 :::22                   :::*                    LISTEN      -               
tcp6       0      0 ::1:631                 :::*                    LISTEN      -               
udp        0      0  *                           -               
udp        0      0 *    

I connect with ADSL thus I am behind a router. For this I have made my computer DMZ enabled to my machine.

What can be the problem? When I try to login with my ip, I get my routers config page, when a friend tries to connect to me from internet, he gets "not authorized".

share|improve this question
As your behind the router, you'll need to use localhost Your friend will need to use your-public-ip-address Your Router or ISP may be preventing access from the outside. – GruffTech Mar 18 '10 at 21:08

You need to use your router config to do port forwarding of port 80. Not all routers support port forwarding though.

Also, one IP (your public IP) can't share a single port. Port 80 is in use by the router's own web server (which is handling the router config interface). You may need to forward a non-standard port like 8080 from your router to your Apache server's port 80. In that case, your friend would use http://your-public-ip:8080/

Third, ensure Apache is configured to work on port 80 over IPv4. According to your netstat output, it's only binding to IPv6 on port 80 right now.

To test things, first you should test locally on the Apache server that works. Once that is working, you can add the port forwarding for external access.

share|improve this answer

Your Answer


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