httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joshua Slive <jsl...@gmail.com>
Subject Re: [users@httpd] apache mod_rewrite
Date Mon, 26 Sep 2005 14:19:22 GMT
On 9/26/05, Robert Becskei <brobiwbe@stcable.co.yu> wrote:
>
> Hello everyone,
>
> I'm no expert at httpd , I know how to set up basic stuff but that is all I
> know how to do. So I ask you to please help me solve this problem.
>
> I have 20 video camera servers in my lan, all of them have a software that
> can be used to access them by default on port 80.
>
> I have only one public ip address.
>
> I'm doing port forwarding currently in the following way:
>
> all trafic that goes to xxx.xxx.xxx.xxx:10022 is redirected to
> 192.168.56.10:80 (xxx.xxx.xxx.xxx = public ip).
>
> what I would like to do is to be able to access xxx.xxx.xxx.xxx:10022 like
> camera1.mydomain.com.
>
> How do you do this with mod rewrite?

I believe you want a reverse proxy, which is discussed in detail here:
http://www.apacheweek.com/features/reverseproxies

You can also do it with mod_rewrite if you prefer.  It would look
something like:
RewriteCond %{HTTP_HOST} ^camera1.mydomain.com$ [NC]
RewriteRule ^/(.*) http://xxx.xxx.xxx.xxx:10022:/$1
ProxyPassReverse / http://xxx.xxx.xxx.xxx:10022/

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message