Koozali.org: home of the SME Server

How to get to external www page?

Michael Smith

How to get to external www page?
« on: March 27, 2003, 11:50:26 PM »
Okay, flame me if you will, but if this has been covered before please point me to the thread.  I did search, honest I did!

http://forums.contribs.org/index.php?topic=6842.msg24643#msg24643

This doesn't quite do it, though.

I set up a SME 5.6 server for a nonprofit organization here in town; it runs their dialup Internet connection & collects & distributes multidrop email.  I set it up as (servername).(nonprofit).org.  Email, Internet works great.  No webhosting desired.

HOWEVER:  there IS a www.(nonprofit).org website out there, and even though I *deleted* the www.(nonprofit) hostname from the SME server via the Server Manager, none of the workstations inside the network can see the external site.  

(Yes, I did resolve the IP of the external site & try pointing the www hostname there from within the server manager ... no joy.  The bare IP just points to register.com)

http://forums.contribs.org/index.php?topic=6842.msg24643#msg24643
This guy seems to think just deleting the www hostname will do the trick, but it didn't work for me on 5.6.

In another thread, a poster seemed to think that clearing the server & workstation caches (will a reboot do it on the server)?  would do it, after deleting the www hostname.

So ... flame on, but at least point me in the right direction please!

Kelvin

Re: How to get to external www page?
« Reply #1 on: March 28, 2003, 12:26:03 AM »
Hi Michael,

Unless your externally hosted website is *odd*, setting www in hostnames and addresses is the way to do it. I've done this on many installations (and up until recently, on my own domain as well).

However, as you have noticed, just changing the www setting does not seem to work. It actually does, but the problem is a combination of things. On some installations, you must reboot the server as well as clear the squid cache on the server. Then you must also clear the history / cache / temporary internet files from the workstations as well. However, I have found that you don't always have to do these steps. Some installations requires one or two of the steps and some, all those steps.

Kelvin

Cyrus Bharda

Re: How to get to external www page?
« Reply #2 on: March 28, 2003, 12:57:27 AM »
Michael,

I have done the same thing as Kelvin, I have my SME 5.5u3 installed as server & gateway and do not want to host www because we are only on a 56k modem connection. Our primary website is hosted by a hosting company and we needed access to it to ftp changes to it and found that when we tryed to ftp to it the requests were being intercepted by the SME box, that and www to the site was doing the same so I did this in my Hostnames and Addresses:

Hostname             Visibility        Location             Local IP  
ftp.langs.net.au        Local          Remote         203.63.219.194
www.langs.net.au     Local          Remote         203.63.219.194

203.63.219.194 being the ip of my hosting company.

Everything works fine now, been that way for over 6 months now :-)

Cyrus Bharda

Graeme Fleming

Re: How to get to external www page?
« Reply #3 on: March 29, 2003, 11:26:50 PM »
Hmm

It would seem that your sites are not being hosted on a virtual server under Apache.  I have a coupla clients that no matter what I try (all the above plus a coupla other tricks) I can't get access to their site.

In conversations with the ISP's in question they inform me that resolving to an IP will not provide their server with the info it requires to allow Apache to do its stuff.

If I type in the full address of the home page as a sub address of the ISP I can see the page but it doesn't work properly cos of some assumption the page is making re the home page base address.

This is still ongoing, so if anyone has any further ideas let me know!

Kelvin

Re: How to get to external www page?
« Reply #4 on: March 30, 2003, 12:16:51 AM »
Hi Graeme,

Could you give me some examples of site with this problem ?

Kelvin

Graeme Fleming

Re: How to get to external www page?
« Reply #5 on: March 30, 2003, 12:54:29 PM »
One site in question is www.thesproutfactory.com.au

This site is hosted on an Apache virtual server; if the above address is pinged you get 203.59.24.225; if this address is resolved via ping -a 203.59.24.225 you get domainhost.iinet.net.au.

If this IP is used within the hosts panel of SME it hooks a redirect page that takes you to the ISP home page.

.. and around and around we go :-(

Kelvin

Re: How to get to external www page?
« Reply #6 on: March 30, 2003, 01:33:14 PM »
Hi Graeme,

Hmm... I just did a quick test on a spare PC with SME 5.6 (configured it as thesproutfactory.com.au), set the hostnames panel www entry to point to 203.59.24.225, then logged into the server console as root, ran lynx and navigated to www.thesproutfactory.com.au and the correct sprout factory page page came up (minus all formatting, graphics etc., of course).

I will check again after I reformat, do a clean install and use a dial-up modem this time and see if I can get it to work again.

Kelvin

Ed Form

Re: How to get to external www page?
« Reply #7 on: March 30, 2003, 09:20:23 PM »
Graeme Fleming wrote:

> This is still ongoing, so if anyone has any further ideas let
> me know!

Try this...

http://www.e-smith.org/docs/howto/contrib/Howto_use_virtual_domain_aliases.htm

...and mail me if it gives you trouble.

Ed Form

Kelvin

Re: How to get to external www page?
« Reply #8 on: March 31, 2003, 09:31:02 AM »
Hi Graeme,

I just finished testing.

I reformatted my test SME 5.6 server and clean loaded SME, configured it for dial-up to my ISP and also configured the SME server as thesproutfactory.com.au. I then configured the hostnames panel to point www to 203.59.24.225.

Then, I configured my laptop as a client to the test SME server.

Fired up IE and went to www.thesproutfactory.com.au and up came the Sprout Factory Website.

It did not redirect to the ISP as you have encountered.

As this is a clean loaded environment (neither the SME server nor the laptop has been to the sprout factory web site prior to this test), I can only suggest that the problem you are encountering must be from something else.

Regards,

Kelvin

Kelvin

Re: How to get to external www page?
« Reply #9 on: March 31, 2003, 09:32:57 AM »
By the way, Graeme, which version of SME are you running ?

Kelvin

Graeme Fleming

Re: How to get to external www page?
« Reply #10 on: March 31, 2003, 11:53:07 AM »
Excellent Kelvin

Thanks for taking so much time over my prob.

This system is currently on SME 5.5U3

Two questions
a) Have you setup proxy info in your browser??
b) Do you know if there is a simple/reliable way to clear the squid cache - I was wondering if anyone has an RPM that may allow this from the server-manager?

Thanks again

Kelvin

Re: How to get to external www page?
« Reply #11 on: March 31, 2003, 12:02:46 PM »
Hi Graeme,

>Thanks for taking so much time over my prob.

No worries. We can all learn something (and I do, everyday !).

> a) Have you setup proxy info in your browser??

No, since SME does transparent proxying.

>b) Do you know if there is a simple/reliable way to clear the squid cache - I was
>wondering if anyone has an RPM that may allow this from the server-manager?

Yes.
There's a manual way (search forums for 'flush squid cache') and there is a contrib as well :-
http://www.tech-geeks.org/contrib/loveless/beta/squidProperties/

Cheers,

Kelvin

Charlie Brady

Re: How to get to external www page?
« Reply #12 on: March 31, 2003, 08:18:14 PM »
Graeme Fleming wrote:

> b) Do you know if there is a simple/reliable way to clear the
> squid cache

Clearing the squid cache is a waste of your time (and probably your money).  The cache is there for a reason.

If you want to bypass the cache for a particular page, use the appropriate buttons on your browser: Shift/refresh on Netscape/Mozilla and Control/Refresh on IE, iirc.

Charlie

Andy Berry

Re: How to get to external www page?
« Reply #13 on: April 11, 2003, 04:32:09 PM »
I'm having the same problem here (5.6 u2)
www.domain.com  is externall hosted, so I've tried every trick I've found in here, but I still can't connect to it from behind my SME server.
Currently I have the server setup with xxx as primary domain.  
domain.com is configured as a virtual domain. www.doamin.com is configured to point to an external IP (host server's IP).
home.domain.com is configured exactly the same way under the hostname panel.
I can access the site using http://home.domain.com, but not using http://www.domain.com
www. now gives me an authorization failure page.  I'm not inside the LAN right now, so I can't give you the exact error message.
(It just occurred to me to check which site (ISPs or SME server) is issuing that message...)
Any ideas?
Thanks
-A