RE: [users@httpd] apache 2.0 as reverse proxy using mod_rewrite

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



OK Here is the deal: Your rewriterule is unnecessary. That's probably what caused the 302.

What your rewriterule does is to send a redirect to https://webserver/ in response to a request for the root path https://webserver/ (or a redirect to https://login/ in response to a request for the root path https://login/).

To me the ProxyPass and ProxyPassReverse directives are sufficient for what you want to achieve. RewriteRule take precedence on ProxyPass. Remove the RewriteRule and it will work.

-ascs

-----Original Message-----
From: Heitmann, Herwarth [mailto:herwarth.heitmann@xxxxxxxxxxxxx] 
Sent: Friday, June 24, 2005 10:01 AM
To: users@xxxxxxxxxxxxxxxx
Subject: RE: [users@httpd] apache 2.0 as reverse proxy using mod_rewrite

Hello,

The configuration of virtual host https://login is the same:

Listen ip-address:443
 
<VirtualHost ip-address:443>
    ServerAdmin webmaster@login
    ServerName webserver
    ProxyPass / http://login-internal/
    ProxyPassReverse / http://login-internal/
    SSLEngine on
    SSLCertificateFile /etc/httpd/conf/ssl.crt/webserver.crt
    SSLCertificateKeyFile /etc/httpd/conf/ssl.key/webserver.key
    ErrorLog logs/error_log_webserver
    TransferLog logs/access_log_webserver
 
    RewriteEngine On
    RewriteRule ^/$ https://login/$1 [R,L]
 
</VirtualHost>

And this is working....

Webserver1 is indeed a typo. I thought $1 is the rest of the parameters. So https://webserver/test supposed to be forwarded to http://webserver-internal/test and will be rewritten back to https://webserver/test

I am probably wrong, but please enlighten me...

Greetings,

Herwarth

---------------------------------------------------------------------
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@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux