Koozali.org: home of the SME Server

Directing a website to another server

grequito

Directing a website to another server
« on: December 10, 2004, 03:46:27 PM »
Hi everybody,

I have Sme 6.0.1 server and gateway installed and is working fine, but unfortunaly i need to setup a windowzzz 2000 server to host an .asp site with ms sql running and i need to tell Sme to direct the requests for that specific site to the 2000 server, but the Sme keep responding to my php site hosted there.
So... Does anyone know how to do this, without running the .asp site on Sme??? I cant migrate de .asp site, because it is installed on a server that i cant access and i will just be hosting for a while. I have just one public ip and both sites work through port 80.
Thanks in advance,

Gabriel Requito

Offline Boris

  • *
  • 783
  • +0/-0
Directing a website to another server
« Reply #1 on: December 10, 2004, 08:25:28 PM »
search this forum for proxypass. It works well.
...

Offline rexgaylord

  • ***
  • 59
  • +0/-0
    • http://www.backuplasvegas.com
Directing a website to another server
« Reply #2 on: December 11, 2004, 09:59:56 PM »
I've tried doing a forward on an unused port for some applications like this.  For example you can forward port 8000 to port 80 at the IP address of your ASP server.  Then when you need to use the ASP server the link would be like http://www.yoursever.com:8000 and I found that it works best if you create a DNS record for the ASP host and use that instead of www.  I've tried to so this with secure by port forwarding port 8443 to 443 then using http://secure.yourdomain.com:8443 and https://secure.yourdoamin.com:8443 but even though there is an SSL cert installed that don't work.  But if you don't have to to SSL port forwarding 8000 to 80 on the ASP server does work.
......................................................

tanyu

dns record
« Reply #3 on: December 17, 2004, 04:57:14 AM »
I'd like to do something like this too, but I'm not very familiar with DNS programming on linux, is there a contrib to program DNS like you can do on windows servers ???  :-)

Quote
I've tried doing a forward on an unused port for some applications like this. For example you can forward port 8000 to port 80 at the IP address of your ASP server. Then when you need to use the ASP server the link would be like http://www.yoursever.com:8000 and I found that it works best if you create a DNS record


 :-)

Offline dmac

  • ****
  • 143
  • +0/-0
    • http://www.rylar.ca
Directing a website to another server
« Reply #4 on: December 17, 2004, 03:10:04 PM »
Why not convert your ASP page to PHP and place on your SME Server?

http://asp2php.naken.cc/ Had built a converter for just this problem.

I also remember reading something once, but can't seem to find, about hosting the HTML protion on the SME Server and pointing the scripts execution to the Windows Box.  Can't remember if it related to ASP or just to ActiveX controls.  At the time was looking at how to set up SME to frontend a Windows 2000 Terminal Service Web interface.

Best solution would be to move to PHP and MySQL on your SME box.   :-D
"In a world without Fences, why do we need Gates and Windows"

tanyu

Directing a website to another server
« Reply #5 on: December 18, 2004, 08:02:55 AM »
I wrongly explained myself..
I have two servers :
- One is connected to the web and holds the domain name : www.mydomain.com, which is registered and accessible worldwide, but is a small server with few disk space and already used as a mail server.
- The other is a larger one with more disk space and is locally registerd as webserver.mydomain.com
Both are sme and run php websites.
I would like to register at my domain registrar the second one as webserver.mydomain.com and make it reachable worldwide under http://webserver.mydomain.com. I created an entry at my registrar's under webserver.mydomain.com with my ip adress:8080 and forwarded the 8080 port of my main server to port 80 of the second server.. so it works well for the index page, but when the second server refers to its own pages as webserver/mydomain.com/page.php, it does not work anymore.. so I'm looking for a reliable solution to make this server be seend correctly as webserver.mydomain.com worldwide..

I hope I'm clear enough ;-)

cheers,
tanyu.


Quote
Why not convert your ASP page to PHP and place on your SME Server?

lamerfreak

Directing a website to another server
« Reply #6 on: December 21, 2004, 09:35:36 PM »
DNS won't do ports, so that doesn't make sense.  You could probably just set it up as webserver.mydomain.com on the SME server, and put a simple .htaccess file with a 302 redirect.

Offline rexgaylord

  • ***
  • 59
  • +0/-0
    • http://www.backuplasvegas.com
Directing a website to another server
« Reply #7 on: December 22, 2004, 01:49:17 AM »
The DNS entry I was referring to was at the DNS server level.  Example:  If you are hosting www.myserver.com on your SME but you want to redirect the port 443 on SME to an  IIS Server inside the network called secure, then there were need to be a host entry in DNS for secure.mydomain.com so that https://secure.mydomain.com would have a valid certificate name.
......................................................

lamerfreak

Directing a website to another server
« Reply #8 on: December 22, 2004, 03:21:47 AM »
Quote from: "rexgaylord"
The DNS entry I was referring to was at the DNS server level.  Example:  If you are hosting www.myserver.com on your SME but you want to redirect the port 443 on SME to an  IIS Server inside the network called secure, then there were need to be a host entry in DNS for secure.mydomain.com so that https://secure.mydomain.com would have a valid certificate name.


This I know.  I was remarking on a later post:

Quote from: "tanyu"
I created an entry at my registrar's under webserver.mydomain.com with my ip adress:8080


Pedantic, I know, but hey.

Another question - how are the actual pages coded?  Absolute or relative links?