Setting up a webserver on Home PC through Zoom ADSL X5 Router

Hi,

I'm having a problem setting up a webserver on my home network. I have a Win XP PC running Apache 2.0.54 configured using the static IP address 10.0.0.16. It is configured to listen to port 80 (using the commands 'Listen 80' and 'ServerName 80'(??) in the httpd.conf file). My router is a Zoom ADSL X5 (not A) and my ISP is BT Broadband.

Following previous suggestions on this site, I have redefined the router's HTTP Server Port to 8080 and set HTTP Server Access to All on the Misc Configuration section of the Advanced Setup page, that is, I now type 10.0.0.2:8080 to access the router's web-console. In addition, I have configured a Virtual Server to Public Port 80, Private Port 80, Port Type TCP, Host IP Address 10.0.0.16, which (to my understanding) should forward Port 80 traffic to my webserver's Port 80 at 10.0.0.16.

Given an external IP address of 86.134.x.x, I can access the web-console using 86.134.x.x:8080, but when I type 86.134.x.x (expecting the apache test page) I get the message "The connection was refused when attempting to contact 86.134.x.x".

I have not tried to access the page from outside my LAN as yet, i.e. on a friend's PC. Does anyone have any ideas as to why my webserver seems unable to process the page request? Does anyone know if BT Broadband are one of those ISPs who block Port 80 requests thereby making all my efforts redundant anyway and if so how can I get around this problem?

Any help would be greatly appreciated. Thanks.

diwyatt2005Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

humeniukCommented:
There may be hope yet.  Most routers, etc., will not allow you to access the network from within the network via the internet IP.  If you want to test the connection from the outsite, you really have to test it from the outside.  (If you can provide your IP address, I can check for you, if you wish).

In the meantime, can you access your Apache test page from the LAN using the LAN IP of the web server?  If not, the problem is with your server config rather than the router.

Also, have you configured port forwarding or NAT so that incoming http (port 80) traffic is forwarded to the LAN IP of your server?

I looked around a bit and couldn't find any reference to BT blocking port 80.  In fact, there seem to be quite a few people running web servers on BT connections, so you're probably fine.  However, if you want to be sure, you really should confirm that with BT.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
diwyatt2005Author Commented:
Yes, I can access the Apache test page from the LAN using the Web Server's IP. My understanding is that configuring a Virtual Server by setting Public Port and Private Port to 80, Port Type TCP and Host IP Address 10.0.0.16, should perform the forwarding of incoming http traffic to my webserver at 10.0.0.16. However, I'm a little reluctant to give out my IP at this early stage of development of my server system so I'll try accessing from a friend's before I consider it further.

Since, the server works fine inside the LAN, it seems that finding out if someone can connect from outside is the crux of my problem. Incidentally, as I understand it is possible to use a anonymous proxy server as an aid during development of webserver, since this technique has requests originate outside of the LAN. Is my undertsaning correct here? Can you suggest a good (prefereably free) service?

A key setting, I think, is changing HTTP Server Access from "Restricted to LAN" to "All" on the Misc Configuration section of the Advanced Setup page. Does this make sense to you? I think your point about  "most routers" not allowing "access the network from within the network via the internet IP" is the key here. I suspected this may be the case having seen it somewhere but am unable to recollect the source so can't verify it.
humeniukCommented:
"... I'm a little reluctant to give out my IP at this early stage of development of my server system ..."
That's fair.

"Incidentally, as I understand it is possible to use a anonymous proxy server as an aid during development of webserver, since this technique has requests originate outside of the LAN."
Theoretically, that should work.  I say 'theoretically' simply because I've never done it.  You can find a number of services here - www.proxy4free.com - or here - www.publicproxyservers.com.

"A key setting, I think, is changing HTTP Server Access from "Restricted to LAN" to "All" on the Misc Configuration section of the Advanced Setup page. Does this make sense to you?"
It does.

Also, are you sure your router is forwarding http traffic to your server?
Exploring ASP.NET Core: Fundamentals

Learn to build web apps and services, IoT apps, and mobile backends by covering the fundamentals of ASP.NET Core and  exploring the core foundations for app libraries.

diwyatt2005Author Commented:
How can I test whether my router is forwarding traffic? I'm assuming that the only way is getting the Apache test page when tapping in my external IP on an external browser. Do you know of any other way? Could I use telnet or ping? I know you can state the port address together with IP using telnet so this may be a possiblity. But isn't this still the same problem - external access to the internal webserver? I've checked a few pages related to my particular router and am sure I've correctly setup port forwarding for my webserver and I know that my router's web server is only accessible through port 8080 thereby leaving port 80 for any other service offered on the network - I hope :0)

My next thought is that Apache isn't setup correctly - in particular, I've got the ServerName directive set to 80 not 10.0.0.16:80 or 86.134.x.x:80. Any ideas which is the correct setting for my network?

Thanks again for all you help.
humeniukCommented:
Happy to be able to help.  I'll be happier when everything is working, though  :)

If you're not sure about the port forwarding, you can take a look at the info on page 24 of the manual - www.zoom.com/documentation/adsl/5554_UsersManual_EngRevB.pdf.  If this is what you have done, then your router is likely configured properly.  Unfortunately, the only way to test it is to, well ... test it.

Please note as well that since you are using WinXP, you will have to either shut off the WinXP internal firewall or configure it to allow incoming port 80 traffic.  The best bet is to turn it off initially so that you can test the router.  Once you are able to connect through the router from the internet, you can turn the XP firewall back on and configure it.  If you are no longer able to connect, you'll know that the XP firewall is the problem and not the router firewall.

In terms of your Apache config, I'm not an expert, but ServerName is typically www.something.com and I believe it must be a FQDN.  If this is an IP-based site rather than a name-based site, I'm not 100% sure, but I believe you want something like this ...

<VirtualHost *>
    DocumentRoot /home/www/site
</VirtualHost>

... or ...

<VirtualHost 10.0.0.16>
    DocumentRoot /home/www/site2
</VirtualHost>

... ie. no ServerName at all.  I have sent a note to a good Apache Expert asking for clarification on this.
periwinkleCommented:
ServerName should not be set to just the 80 - it should be set to the hostname (and optionally the port).  It's used primarily for virtualhost settings when there are multiple domains with the same IP address, but it can also be used outside of the virtuahost container when you are setting the name of the web server (when there are multiple names for a given IP address).

For more information on ServerName, see http://httpd.apache.org/docs-2.0/mod/core.html#servername for the Apache documentation.

If you do not specify a server name, the Apache web server will try and guess its own name by doing a reverse lookup on the ip address.  I notice that there isn't a reverse name for 10.0.0.16 - I get:

host 10.0.0.16
Host 16.0.0.10.in-addr.arpa not found: 3(NXDOMAIN)

I think perhaps you have confused the ServerName directory with the NameVirtualHost directive.  Try setting the following:

Port 80
Listen 80
NameVirtualHost 10.0.0.16:80
NameVirtualHost 86.134.x.x:80

Then, you should set up a VirtualHost like:

<VirtualHost 10.0.0.16>
    DocumentRoot /home/www/site
    ServerName www.myname.com
</VirtualHost>

<VirtualHost 86.134.x.x>
    DocumentRoot /home/www/site
    ServerName www.myname.com
</VirtualHost>

or the like.

I'm not convinced as to which IP address you should set - I've included them both, and they shouldn't hurt anything.
humeniukCommented:
Thanks, Periwinkle.  Now that you've gotten me curious :) ... if you're not using a domain (ie. only accessing the site by IP), do you put a dummy URL (ie. www.myname.com) in as the ServerName?

My guess is that the LAN IP is the one since the server's view of the world is simply of the network (including the default gateway).  But if there is no problem listing both, that looks like the safe bet.
periwinkleCommented:
If you are not using a domain for the ServerName, you wouldn't use name-based virtual hosting;  instead you'd use IP based virtual hosts.  More information for IP-based virtual hosts can be found here:

http://httpd.apache.org/docs-2.0/vhosts/ip-based.html

Incidentally, I believe I may have a slight error in the above.  The argument to the <VirtualHost> directive must exactly match the argument to the NameVirtualHost directive;  in my above example, you'd use 86.134.x.x:80 instead of 86.134.x.x and 10.0.0.16:80 instead of 10.0.0.16 in the <VirtualHost...> directive.

For more information in general on virtual hosting, see:

http://httpd.apache.org/docs-2.0/vhosts/
humeniukCommented:
I took a look at those earlier, but was still a bit unsure.  All of the examples in the first link (IP-based) feature a ServerName - <hostname>, but don't specify what to use if you don't have an actual host name.

Nevertheless, the second link specifies, as you did, that a host name must be used for the ServerName: "If no ServerName is specified, then the server attempts to deduce the hostname by performing a reverse lookup on the IP address. If no port is specified in the ServerName, then the server will use the port from the incoming request. For optimal reliability and predictability, you should specify an explicit hostname and port using the ServerName directive."
diwyatt2005Author Commented:
Thanks for all your help humeniuk and periwinkle - I finally managed to get the system to work - it looks like changing HTTP Server Access from "Restricted to LAN" to "All" on the Misc Configuration section of the Advanced Setup page was all that was required. My port forwarding works fine! I currently have ServerName set to 10.0.0.16:80 but will look into the last few comments about virtual hosting more closely to consolidate my understanding and make the server instance more robust to change. Next thing to do is to reinstate the personal firewall on the server PC and deal with issues related to this. Incidentally, I discovered a way to test external IP access from within the LAN - Google's translation service. I wrote a simple HTML page with the word "Hello" and ran it through the translation service giving 86.134.x.x/test.html as the page to translate from English to German - the result ........ Hallo. This seems to a be a quick and easy way to discover if external IP access works, but I'll look into anonymous proxy servers more closely as this seems to be a better solution for serious development (as well as the obvious benefits of anonymous surfing.
periwinkleCommented:
Glad that you found your solution!
humeniukCommented:
Glad to hear it.
humeniukCommented:
Looks like a PAQ.
periwinkleCommented:
Agreed - recommendation - PAQ (refund)
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Broadband

From novice to tech pro — start learning today.