Koozali.org: home of the SME Server

Remote web page does not display from within the local network

Offline toothandnail

  • ****
  • 139
  • +0/-0
I've had this happen on two SME systems, haven't managed to find a solution in either case, and my attempts to search the SME docs and forum haven't turned up anything useful...

In both cases, server manager > hostnames & addresses has been used to set both the proxy address and the www entry as remote, with the correct IP entered. In both cases, the web page is correctly located and loaded from anywhere on the internet, but any attempt to access the page from within the local network goes straight to the primary iBay.

I'm sure I did find some similar problems a while ago, but this time I've found nothing useful. Can anyone point me in the right direction to fix his problem? I'm probably using the wrong search terms, but so far, searching isn't doing me much good at all.

In the first case, the problem existed when the server was an 8.1 machine, and persisted when it was migrated to 9.0+. In the second, its a quite new installation, started with 9.1. The problem in this case showed up when the firm got a new web site, with a different hosting provider.

Paul.
« Last Edit: April 15, 2016, 04:15:24 PM by toothandnail »

Offline janet

  • *****
  • 4,812
  • +0/-0
Re: Remote web page does not display from within the local network
« Reply #1 on: April 15, 2016, 08:27:03 PM »
toothandnail

Try this.
In Domains panel in server manager, configure the domain in question to resolve using Internet DNS servers rather than resolve to Local DNS servers.
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline ricks1950

  • **
  • 40
  • +0/-0
Re: Remote web page does not display from within the local network
« Reply #2 on: April 15, 2016, 09:49:25 PM »
I'm trying to think of why you would use an external proxy; I have a similar setup here, with a remote hosted web and email server, and all I had to do was define the remote hosts correctly in the Hostnames and Addresses panel.  After doing this, www.mydomain.com went to the right place, but mydomain.com went to the primary ibay.  I edited index.html in the Primary ibay to redirect to www.mydomain.com (just google "html redirect" and you will get several techinques). 

I did not change the setting for the proxy server from default, except that I found a couple of web sites that do not display properly when a proxy is used, and turned it off all together. 


Offline toothandnail

  • ****
  • 139
  • +0/-0
Re: Remote web page does not display from within the local network
« Reply #3 on: April 20, 2016, 06:00:48 PM »
toothandnail

Try this.
In Domains panel in server manager, configure the domain in question to resolve using Internet DNS servers rather than resolve to Local DNS servers.

Sorry for the slow reply - tried that once before and found it upset the network, though I think it was due to some embedded machines that had to use static IPs.  So I wanted to wait until I could test it directly. I was able to do that earlier today. No problems with the local network ,but it also didn't help - any attempt to access the web page from within the local network fails, while any attempt from outside finds it without problems.

Paul.

Offline toothandnail

  • ****
  • 139
  • +0/-0
Re: Remote web page does not display from within the local network
« Reply #4 on: April 20, 2016, 06:08:44 PM »
I'm trying to think of why you would use an external proxy; I have a similar setup here, with a remote hosted web and email server, and all I had to do was define the remote hosts correctly in the Hostnames and Addresses panel.  After doing this, www.mydomain.com went to the right place, but mydomain.com went to the primary ibay.  I edited index.html in the Primary ibay to redirect to www.mydomain.com (just google "html redirect" and you will get several techinques). 

I did not change the setting for the proxy server from default, except that I found a couple of web sites that do not display properly when a proxy is used, and turned it off all together.

I think (though its going back quite a while, probably as far as SME 7.2 or 3) that I did that because on the first system I had to set up with a remote web site failed to work without it. I'll try a bit of experimentation and see if that applies to any of the other sites.

I tried setting the proxy back to local with the problematic server, still no difference.

Looks like I may need to raise a bug on the issue - I've tried everything I can think of and so far I'm no further forward. I wonder a bit if it is something to do with the new hosting service. When I first installed this copy of SME, they had a different hosting service, and the remote web site was accessible from within their network. They changed hosting provider and the problem started....

Paul.

Offline ricks1950

  • **
  • 40
  • +0/-0
Re: Remote web page does not display from within the local network
« Reply #5 on: April 20, 2016, 07:28:03 PM »
The way your system works is correct operation.  When you set a host for www.mydomain.com in you Hosts panel, you are ONLY setting that host, not mydomain.com.  If SME is set up in mydomain.com, and is a DNS server, http requests to mydomain.com will go to its index.html in the Primary ibay.  This is correct, and predictable operation.  The server is not doing an external DNS lookup for either of these, it is resolving locally, so it will be completely blind to DNS on the internet for any hosts on mydomain.com

Edit index.html in the Primary ibay to redirect www.mydomain.com and it will work as you expect it to.  Ir really is no big deal, and I do not think it is a bug. 

This is kind of what you get when you host your web site remotely. 

Offline toothandnail

  • ****
  • 139
  • +0/-0
Re: Remote web page does not display from within the local network
« Reply #6 on: April 20, 2016, 08:19:58 PM »
The way your system works is correct operation.  When you set a host for www.mydomain.com in you Hosts panel, you are ONLY setting that host, not mydomain.com.  If SME is set up in mydomain.com, and is a DNS server, http requests to mydomain.com will go to its index.html in the Primary ibay.  This is correct, and predictable operation.  The server is not doing an external DNS lookup for either of these, it is resolving locally, so it will be completely blind to DNS on the internet for any hosts on mydomain.com

:) Well, if its correct behaviour, its not common behaviour. I've got 6 SME servers in local small businesses that have remotely hosted web sites. Most small businesses use standard consumer broadband (especially true in rural areas where little else is available at any reasonable cost), meaning that hosting a web site locally is slow at best, if not completely unusable). Of those 6, setting up the www. listing to the remote IP and setting the proxy to the same remote IP works fine. on 4 of them. Only two have the problem I'm attempting to fix.

Quote
Edit index.html in the Primary ibay to redirect www.mydomain.com and it will work as you expect it to.  Ir really is no big deal, and I do not think it is a bug.

Haven't done that on the latest problem child, but I tried three different methods of redirection on the first one, none of which worked - any attempt to retrieve the web page from the local network resulted in the "under construction" page from the primary ibay being loaded. I now know far more than I ever wanted to about the various methods of html redirection....

Quote
This is kind of what you get when you host your web site remotely.

Not my experience in the best part of 8 years running SME gateway servers.

Paul.

Offline ricks1950

  • **
  • 40
  • +0/-0
Re: Remote web page does not display from within the local network
« Reply #7 on: April 20, 2016, 08:28:40 PM »
If you are getting the Under Construction page, you clearly have not edited it to redirect.

What I described I have used for years on both 8 and 9, and if the configuration is done correctly, it works.

I can't see into your system to see what all you have done, but I know that SME does all the expected things I have tried with DNS.  When there is a screw up it usually comes from me  :-P

Offline toothandnail

  • ****
  • 139
  • +0/-0
Re: Remote web page does not display from within the local network
« Reply #8 on: April 20, 2016, 08:34:48 PM »
If you are getting the Under Construction page, you clearly have not edited it to redirect.

Sorry, but it does, since I deliberately used the existing "under construction" html page as a starting point.

Quote
What I described I have used for years on both 8 and 9, and if the configuration is done correctly, it works.

I'd love to know what you used as a redirect method? I've tried several without any success. Life would be so much simpler if I could get a redirect that works.

Quote
I can't see into your system to see what all you have done, but I know that SME does all the expected things I have tried with DNS.  When there is a screw up it usually comes from me  :-P

:) I've certainly had that experience, but as I've already said, this isn't the first time, and I've gone through all the things I can think of. When one method works for the majority of systems and fails on only a couple, I have to think it is a bug.

Paul.

Offline ricks1950

  • **
  • 40
  • +0/-0
Re: Remote web page does not display from within the local network
« Reply #9 on: April 21, 2016, 12:32:44 AM »
Simply Google "html redirect" and you will get several methods.

Here is some sample code:

<head>
    <meta http-equiv="refresh" content="0; url=http://www.mydomain.com" />
    <meta content="text/html; charset=ISO-8859-1" http-equiv="content-type">
    <title>index.html</title>
  </head>

Put this in /home/e-smith/files/primary/html/index.html (you will have to edit using vim)

There are other methods as well that come up in Google, some of them more highly recommended, but this works.

Offline toothandnail

  • ****
  • 139
  • +0/-0
Re: Remote web page does not display from within the local network
« Reply #10 on: April 25, 2016, 08:30:27 PM »
Simply Google "html redirect" and you will get several methods.

Here is some sample code:

<head>
    <meta http-equiv="refresh" content="0; url=http://www.mydomain.com" />
    <meta content="text/html; charset=ISO-8859-1" http-equiv="content-type">
    <title>index.html</title>
  </head>

Put this in /home/e-smith/files/primary/html/index.html (you will have to edit using vim)

There are other methods as well that come up in Google, some of them more highly recommended, but this works.

:( Same version I tried with the last problem child. Tried again - exactly the same results - no redirect. The interesting thing is that in this instance, the browser on the local network gets a "page under construction" message (haven't seen it, so I don't know the exact content). If it was really looking at the primary ibay it should get nothing at all, so I don't know where the "under construction" message is coming from, unless it is direct from the web server or the proxy. Since I'm remote from the site, I can't do much more until I can get there to see for myself what is going on.

Either way, I still have the same situation - I've tried 3 different redirection methods, none of which work. From the local network, a web site which is available from anywhere else on the internet fails to show up. Looks like a bug to me.... Especially since it worked until the company changed to a new hosting company.

Paul.