Internal port redirecting based on hostname

Internal port redirecting based on hostname

Post by Chris Armstron » Tue, 29 Aug 2000 13:42:51



Hey all. I'm looking for a situation to do some port forwarding for a web
site. here's the situation: I have a Zope server running on port 8080, and
Apache running on 80. I need to redirect port 80 to 8080 _only_ if a
certain hostname is used, and I'd prefer it to do internal redirecting,
rather than telling the browser to go to port 8080. I don't care how to do
it, wether it be an Apache module, some ipchains rules, or whatever.

Thanks for any help.
--
Chris Armstrong          http://www.penguinmints.cx      

when the author's been awake longer than he should have. Please disregard
any senseless drivel.

 
 
 

Internal port redirecting based on hostname

Post by perc » Tue, 29 Aug 2000 04:00:00


are u want to exchange each port of your apache and Zope server.
apache 8080,
Zope server 80


> Hey all. I'm looking for a situation to do some port forwarding for a web
> site. here's the situation: I have a Zope server running on port 8080, and
> Apache running on 80. I need to redirect port 80 to 8080 _only_ if a
> certain hostname is used, and I'd prefer it to do internal redirecting,
> rather than telling the browser to go to port 8080. I don't care how to do
> it, wether it be an Apache module, some ipchains rules, or whatever.

> Thanks for any help.
> --
> Chris Armstrong          http://www.penguinmints.cx

> when the author's been awake longer than he should have. Please disregard
> any senseless drivel.


 
 
 

Internal port redirecting based on hostname

Post by Chris Armstron » Tue, 29 Aug 2000 04:00:00


No. That's not what I want.



> are u want to exchange each port of your apache and Zope server. apache
> 8080, Zope server 80

--

There is a 90% chance that this message was written when the author's been
awake longer than he should have. Please disregard any senseless drivel.
 
 
 

Internal port redirecting based on hostname

Post by Bernd Eckenfel » Wed, 30 Aug 2000 11:33:25



> Hey all. I'm looking for a situation to do some port forwarding for a web
> site. here's the situation: I have a Zope server running on port 8080, and
> Apache running on 80. I need to redirect port 80 to 8080 _only_ if a
> certain hostname is used, and I'd prefer it to do internal redirecting,
> rather than telling the browser to go to port 8080. I don't care how to do
> it, wether it be an Apache module, some ipchains rules, or whatever.

U can use Apache's mod_proxy for that:

<VirtualHost gate2.bla.de:80>
ServerName gate2.bla.de
SSLEnable
ProxyPass / http://127.0.0.1:8080/
</VirtualHost>

NameVirtualHost 1.2.3.4

Greetings
Bernd

 
 
 

Internal port redirecting based on hostname

Post by mike.baro.. » Wed, 06 Sep 2000 19:09:21


Hi.

Maybe you can try to make a virtual host (evenually, a
namedvirtualhost) and tell him to proxy request to Zop :

Listen domain_to_forward
<virtualhost domain_to_forward>

    ProxyPass / http://server:8080/
    ProxyPassReverse / http://server:8080/

</virtualhost>

I Think it must work.

You could use ipchains if your domain was assigned to a spcific ip
adress that is not shared by other domains.

Mike



> Hey all. I'm looking for a situation to do some port forwarding for a
web
> site. here's the situation: I have a Zope server running on port
8080, and
> Apache running on 80. I need to redirect port 80 to 8080 _only_ if a
> certain hostname is used, and I'd prefer it to do internal
redirecting,
> rather than telling the browser to go to port 8080. I don't care how
to do
> it, wether it be an Apache module, some ipchains rules, or whatever.

> Thanks for any help.
> --
> Chris Armstrong          http://www.penguinmints.cx

written
> when the author's been awake longer than he should have. Please
disregard
> any senseless drivel.

Sent via Deja.com http://www.deja.com/
Before you buy.
 
 
 

1. Port Redirect works but doesn't redirect internal traffic

I have two FBSD-4.6 servers. Machine 'A' connects to the internet via 56K
modem and runs NATD for internal unregistered Class 'C' network. Machine 'B'
is on this internal network and runs Apache web server. Machine 'A'
redirects traffic for port 80 to machine 'B'. This works great. So far so
good!

When I try to access the webserver from a Windows workstation on the
internal network, I cannot get to it. Outside traffic from the internet gets
directed just fine, but nothing internal can access the web server.

Here are my setup files:

/etc/rc.conf
======================================================
.
natd_enable="YES"
natd_interface="tun0"
natd_flags="-f /etc/natd.conf"
======================================================

/etc/natd.conf
======================================================
dynamic
redirect_port udp 192.168.100.253:80 80
redirect_port tcp 192.168.100.253:80 80
======================================================

Is it possible that I need to add my NIC ed0 to the natd_interface setting
in the /etc/rc.conf file? Is it possible to have both devices as a NATD
interface?

2. Setup of a dual operating system

3. Redirects based on remote hostname?

4. Thanks for the sendmail help...

5. Want NCSA HTTPd to redirect based on hostname..

6. tape/tar compatibility issues between Solaris and OSF/1

7. redirecting all port 80 requests on internal lan to squid proxy on external lan

8. /dev/modem busy problem

9. Redirecting the same port to several internal hosts

10. ipchains redirect ip based on port. How ??

11. redirect traffic based on ports

12. IPCHAINS REDIRECT with Apache Port-based Virtual Web Servers?

13. redirect ip base on port with ipchains