View unanswered posts    View active topics

All times are UTC - 6 hours





Post new topic Reply to topic  [ 11 posts ] 
Print view Previous topic   Next topic  
Author Message
Search for:
 Post subject: Multiple webservers
PostPosted: Mon May 28, 2007 10:34 am 
Offline
Joined: Wed May 09, 2007 8:47 pm
Posts: 367
Location: Minnesota- Brrrrr!
With the addition of a KM system, I now have 2 webservers. The other is a M$ 2003 webserver, with AD \ DNS. That being said, I can only forward port 80 to one of the two machines at a time.

I think that it is possible to forward the ports to the 2003 server machine so that it routes requests, such as http:\\mythserver.mydomain.com, to the mythserver. Likewise it would be nice to map http:\\msmachine.mydomain.com to the M$ webserver.
This could be a whole new thread, but I thought that it would be important to mention.

I would prefer to setup the M$ active domain \ DNS server to handle this traffic because they are on virtual machines (easily backed up and restored), whereas, my KM machine is running on 'bare metal' and leery of making experiemental changes.

I would think that even if routing these requests were successful, I would need to mod the webservers so that generated links reflect the addition of a DNS zone:
http:\\www.mydomain.com\projectserver
would become:
http:\\www.msmachine.mydomain\projectserver.

Is there an article out that outlines how this can be done? I tried searching on 'DNS', however, after 3 hours I have only ended up creating more questions than I have answered.

_________________
R7.3: 0.22.20091023-1, Hauppauge PVR-500 (Philips FQ1236A MK4), Gigabyte Gigabyte EG45M-UD2H, E5200 2.4Ghz, 2GB RAM, NVIDIA GEFORCE 256MB


Top
 Profile  
 
 Post subject:
PostPosted: Mon May 28, 2007 11:41 am 
Offline
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location: Arlington, MA
For a dead easy solution, why not just configure the Apache instance on the KM box to another port? In file /etc/apache2/ports.conf chnage the port it's listening on to 8080 or the like.


Top
 Profile  
 
 Post subject:
PostPosted: Mon May 28, 2007 3:02 pm 
Offline
Joined: Wed May 09, 2007 8:47 pm
Posts: 367
Location: Minnesota- Brrrrr!
tjc, thank you for the quick fix. This will get me by.

I did find an article for a linux proxyserver.

I have my domain mapped to a dynamic IP address. Click here to see how it was done. I think what I need now is to setup a proxyserver to resolve the FQDN to the LAN IP host addresses.

I will continue to search for a similar article for a M$ 2003 proxy server and post it when I find it.

_________________
R7.3: 0.22.20091023-1, Hauppauge PVR-500 (Philips FQ1236A MK4), Gigabyte Gigabyte EG45M-UD2H, E5200 2.4Ghz, 2GB RAM, NVIDIA GEFORCE 256MB


Top
 Profile  
 
 Post subject:
PostPosted: Mon May 28, 2007 5:33 pm 
Offline
Joined: Sun Feb 26, 2006 11:46 am
Posts: 67
If Apache on the Knoppmyth box were to receive the traffic, there are plenty of tutorials on Apache.org about setting up a virtual server to route msmachine.mydomain.com requests to that machine.


Top
 Profile  
 
 Post subject:
PostPosted: Mon May 28, 2007 7:19 pm 
Offline
Joined: Tue Apr 13, 2004 6:51 pm
Posts: 890
Location: Groton, MA
I have this type of setup on my network. the 'firewall guy' at work only allows http access to port 80, so my old setup of an apache server on 80 and a second on 8080 doesnt work.

I am a little different then the original post as my knoppmyth box is NOT the box exposed to the internet, rather it is the second box in the series.

modem -> router -> webserver -> myth

my router forwards inbound port 80 traffic to the webserver. If the URL that is sent to the webserver is http://<ip>/mythweb, the request is forwarded to the apache server on the myth box.

To make this happen you need two apache mods on the server that your router forwards to.(webserver in my case ) ... MOD_PROXY and MOD_PROXY_HTTP.

in my world, the webserver apache installation has these mods and the following config:

Code:
<IfModule mod_proxy.c>

        ProxyRequests Off

        <Proxy *>
                AddDefaultCharset off
                Order deny,allow
          #      Deny from all
                Allow from all

                #Allow from .example.com
        </Proxy>

        # Enable/disable the handling of HTTP/1.1 "Via:" headers.
        # ("Full" adds the server version; "Block" removes all outgoing Via: hea
ders)
        # Set to one of: Off | On | Full | Block

        ProxyVia On
        ProxyPass /mythweb http://192.168.1.50:8080/mythweb
        ProxyPassReverse /mythweb http://192.168.1.50:8080/mythweb

        ProxyPass /stream http://192.168.1.50:8001/
        ProxyPassReverse /stream http://192.168.1.50:8001/
</IfModule>

the important parts are at the bottom...my myth box is at 192.168.1.50. port 8080
Code:
        ProxyPass /mythweb http://192.168.1.50:8080/mythweb
        ProxyPassReverse /mythweb http://192.168.1.50:8080/mythweb

these lines redirect all http://<routerIP>/mythweb to the apache server on 192.198.1.50 port 8080

for those that us mythstreamtv, the last lines allow me to point vlc to http://<routerIP>/stream to access my vlc streams via the webservers apache forwarding.

(for extra credit, I do all of this through a ssh/putty encrypted tunnel)

workPC -> SSH tunnel -> router -> webserver (MOD_PROXY) -> mythweb

_________________
R5F1 - Dell P4 2.4Ghz 500MB - PVR250 x 2 - GeForce FX 5200 - Onboard sound/NIC 80GB ATA/250GB ATA/400GB SATA


Last edited by khrusher on Tue May 29, 2007 9:01 am, edited 1 time in total.


Top
 Profile  
 
 Post subject:
PostPosted: Tue May 29, 2007 7:35 am 
Offline
Joined: Wed May 09, 2007 8:47 pm
Posts: 367
Location: Minnesota- Brrrrr!
khrusher, excellent explanation: it is carefully thought out and concisely worded. This is a significant contribution to the forum and will not only help me, but will help others in the future.

Out of curiousity, is KM setup such that access is only through SSH?

_________________
R7.3: 0.22.20091023-1, Hauppauge PVR-500 (Philips FQ1236A MK4), Gigabyte Gigabyte EG45M-UD2H, E5200 2.4Ghz, 2GB RAM, NVIDIA GEFORCE 256MB


Top
 Profile  
 
 Post subject:
PostPosted: Tue May 29, 2007 8:59 am 
Offline
Joined: Mon Feb 16, 2004 7:06 pm
Posts: 309
Location: Toronto
what I've done in the past is port re-direction. I run IPCop, which makes it easy for me to forward any port to another port. All web servers still listen on port 80 but the firewall forwards port 80 to port 80 one machine and 81 to port 80 on another machine. works really quite well.

_________________
KnoppMyth Folding@home
How to setup F@H
F@H Stats Page


Top
 Profile  
 
 Post subject:
PostPosted: Tue May 29, 2007 9:07 am 
Offline
Joined: Tue Apr 13, 2004 6:51 pm
Posts: 890
Location: Groton, MA
that was how I was originally setup...that was until i switch employers and could no longer access non-port-80 webservers from work.

It's nice having the extra webserver ($28 pc from ebay) .
- Keeps my myth box as 'myth-only' and
- I run Privoxy so I can bounce my internet traffic through my home connection (again via encryped tunnel) to keep the firewall guy happy.
- another place to fold proteins

_________________
R5F1 - Dell P4 2.4Ghz 500MB - PVR250 x 2 - GeForce FX 5200 - Onboard sound/NIC 80GB ATA/250GB ATA/400GB SATA


Top
 Profile  
 
 Post subject:
PostPosted: Tue May 29, 2007 11:51 am 
Offline
Joined: Wed May 09, 2007 8:47 pm
Posts: 367
Location: Minnesota- Brrrrr!
Gnarl, I am not sure I understood your message.

I think what the message described a port forwarding mechanism that allows mapping of port 80, 81, 82 ... to port 80 on different LAN webservers. The WAN port determines which LAN server is accessed.

_________________
R7.3: 0.22.20091023-1, Hauppauge PVR-500 (Philips FQ1236A MK4), Gigabyte Gigabyte EG45M-UD2H, E5200 2.4Ghz, 2GB RAM, NVIDIA GEFORCE 256MB


Top
 Profile  
 
 Post subject:
PostPosted: Tue May 29, 2007 12:01 pm 
Offline
Joined: Mon Feb 16, 2004 7:06 pm
Posts: 309
Location: Toronto
gatorback wrote:
...mechanism that allows mapping of port 80, 81, 82 ... to port 80 on different LAN webservers. The WAN port determines which LAN server is accessed.
That's exactly it, iptables on my WAN/router forwards to the web servers based on what port was accessed on the WAN/router.

_________________
KnoppMyth Folding@home
How to setup F@H
F@H Stats Page


Top
 Profile  
 
 Post subject:
PostPosted: Tue May 29, 2007 12:40 pm 
Offline
Joined: Tue Apr 13, 2004 6:51 pm
Posts: 890
Location: Groton, MA
most home-network quality firewall products only allow mapping inbound ports to a particular IP address in the LAN. This forwarding doesnt allow mapping of different port numbers.

With these routers, the following is NOT possible.
Code:
http://<WAN-IP>:80/  -> http://<LAN-IP>:8080


You can do this if you want...
Code:
http://<WAN-IP>:80/  -> http://<LAN-IP>:80
http://<WAN-IP>:81/  -> http://<SECOND-LAN-IP>:81


Or you can setup your 'port-80' webserver as a reverse proxy

_________________
R5F1 - Dell P4 2.4Ghz 500MB - PVR250 x 2 - GeForce FX 5200 - Onboard sound/NIC 80GB ATA/250GB ATA/400GB SATA


Top
 Profile  
 

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 11 posts ] 


All times are UTC - 6 hours




Who is online

Users browsing this forum: No registered users and 76 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group

Theme Created By ceyhansuyu