Super User is a question and answer site for computer enthusiasts and power users. 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 have public IP, then router and home network with 192.168.1.zz My router is set to portforward every 8056 on ip adress (my PC), where apache is running. Apache listen is set to:


When i try:


I get message "unexpected end of apache" (I'm using easyphp for windows).

Added: When i try to access via browser, it's prompting router request for authorization to access router web-settings. And when i try, browser says that connection timed out =(

share|improve this question
Check firewall settings as well. – MrStatic Mar 14 '10 at 19:13
My only windows fireawall is off =) – Filip Mar 14 '10 at 19:15
AV software will also have firewall... – marcusw Mar 15 '10 at 0:05
up vote 6 down vote accepted

You'll need to configure apache to listen on (on, the requests will arrive on port 80. not 8056). Also make sure that on the router port 8056 is forwarded to port 80

share|improve this answer
I dont have settings in my router webconfigurator to portforward on specified port =( .. just: Local IP Address - Protocol - Port Range – Filip Mar 14 '10 at 19:16
What's you router make and model ? You can also try to use wireshark on your windows computer to make sure on which port the HTTP requests are received. – Dominik Mar 14 '10 at 19:24
I have ZCOMAX WA 2204 and i have uPNP enabled. There are "Ping Access on WAN" and "Web Server Access on WAN" options as well, enabled too. – Filip Mar 14 '10 at 19:31
I set with my apache to DMZ and still nothing =( – Filip Mar 14 '10 at 20:00
Access to from my notebook that is in same "home" network is working just fine even when listen is set to "Listen", ping to my is forking fine and port 8056 on my is opened assuming info from – Filip Mar 14 '10 at 20:25

You do not need to change the port Apache is listening at all! In my case, Apache listens at port 80 normally.

You must:

  1. Configure all routers and modems (some modems have an internal router, such as DLINK) to receive some unusual ports as '8081' to '8082' AND redirect those requests to the IP where your apache server is running, at the port 80. Avoid to use 8080, 8081 or higher.

  2. Put the hosts (both networks) in the DMZ (host at "DEMILITARIZED ZONE", in other words, out of policies)

There are 2 networks in my case:

  • (modem)
  • (wireless router)


Suppose a modem router whose network is and the Apache PC is AT You must configure NAT - Virtual Servers acessing / NAT / Virtual Servers:

PortStart......PortEnd......type....... dest IP........ dest PORT
...8081..........8082........TCP...... 80

DMZ Host: ← the UP used by the Apache PC network. To get it, run ipconfig at cmd prompt.

For the secondary router (wireless) whose network is DMZ Host: ← IP of the PC running Apache in the wireless router subnet.

To preview the site, do not use your home wireless or or a computer connected to your home network, because all you will see is the modem's router page. You must access your site from outside the home network (ex: use your mobile GSM internet, never WiFi).

The scheme to access the site, so, lets suppose the current internet IP is

  • or

  • or


Remember, Apache is still listening at port 80. Who does the magic are the routers, especially the first (modem) that redirects the ports. NAT – Virtual Servers. DMZ is also essential. For both router configurations.

share|improve this answer

Turn off the "Web Server Access on WAN" option.

change the port forward "range" to just be 80.

change apache back to "Listen"

share|improve this answer
This may not work as many ISPs block incoming port 80... – marcusw Mar 15 '10 at 0:52
quote the OP "Added: When i try to access via browser, it's prompting router request for authorization to access router web-settings. " – user23307 Mar 15 '10 at 2:06

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .