httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jérôme Tytgat <jerome.tyt...@asterion.fr>
Subject Re: [users@httpd] Proxyerroroverride and "302" errors
Date Fri, 26 Aug 2005 08:24:38 GMT
> 
> Since when is 302 an error?

Since it's interpreted as it ?

Anyway, the problem occurs WHEN and only WHEN I use ProxyErrorOverride

> 
> You may need a proxyPassReverse directive.  See
> http://www.apacheweek.com/features/reverseproxies
> 

I use it... elsewhere my reverse proxy would not at all :

<VirtualHost *:443>
        SSLEngine On
        SSLProxyEngine on
        SSLCACertificateFile /etc/apache2/ssl/cacert.pem
        #SSLCertificateFile /etc/apache2/ssl/www.toto.net.crt
        #SSLCertificateKeyFile /etc/apache2/ssl/www.toto.net.key
        SSLCertificateFile /etc/apache2/ssl/newcert.pem
        SSLCertificateKeyFile /etc/apache2/ssl/private.key

        ServerAdmin webmaster@toto.net
        ServerName www.toto.net
        ServerAlias toto.net

        CustomLog /var/log/apache2/https.toto.net.log combined
        ErrorLog /var/log/apache2/https.toto.net.error.log

        RewriteEngine on
        RewriteOptions inherit
        RewriteLog "/var/log/apache2/rewrite.https.toto.net.log"
        RewriteLogLevel 0

        ProxyRequests off
        ProxyVia Off
        ProxyErrorOverride Off
        ProxyPreserveHost Off
        <Proxy *>
                Order Deny,Allow
                Allow from all
        </Proxy>

        #ProxyPass /prod/ http://1.0.0.3/
        #ProxyPass /class/ http://1.0.0.2/
        ProxyHTMLURLMap http://1.0.0.2 /class
        ProxyHTMLURLMap http://1.0.0.3 /prod

        <Location "/prod/">
            ProxyPassReverse http://1.0.0.3/
            SetOutputFilter      proxy-html
            ProxyHTMLURLMap / /prod/
            ProxyHTMLURLMap /prod /prod
        </Location>
        <Location "/class/">
            ProxyPassReverse http://1.0.0.2/
            SetOutputFilter      proxy-html
            ProxyHTMLURLMap / /class/
            ProxyHTMLURLMap /class /class
        </Location>
        <Location "/">
        #    ProxyPass http://1.0.2.1/
            ProxyPassReverse http://1.0.2.1/
        </Location>


        #Stats

        Alias /sst/stats-icon/ /usr/share/stats/icon/
        ScriptAlias /sst/cgi-bin/ /usr/lib/cgi-bin/
        #ScriptAlias /sst/cgi-bin/ /usr/lib/cgi-bin/plouf/
        Alias /sst/     /usr/share/stats/
        <Location "/sst/">
                SecFilterEngine Off
                Options None
                AllowOverride None
                Order Deny,Allow
                Allow from all
                AuthName "Statistiques www.toto.net"
                AuthType Digest
                AuthDigestFile /var/www/plouf/.htpasswd-digest
                require valid-user
        </Location>

        <Directory /var/lib/stats>
                Options None
                AllowOverride None
                Order Deny,Allow
        </Directory>
        <Directory /usr/share/stats>
                Options None
                AllowOverride None
                Order Deny,Allow
        </Directory>

        # RewriteRules

        RewriteRule ^/sst$              https://www.toto.net/sst/stats.html [R,NC]
        RewriteRule ^/sst/$             https://www.toto.net/sst/stats.html [R,NC]

        RewriteRule ^/class$            https://www.toto.net/class/ [R,NC]
        RewriteRule ^/class/class(.*)$  https://www.toto.net/class$1 [R,NC]

        RewriteRule ^/prod$             https://www.toto.net/prod/ [R,NC]
        RewriteRule ^/prod/prod(.*)$    https://www.toto.net/prod$1 [R,NC]

        RewriteCond %{HTTP_REFERER}     ^https://(www\.)?toto.net/class/.*$ [NC]
        RewriteCond %{REQUEST_URI}      !^/class/.*$ [NC]
        RewriteRule ^/(.*)$             https://www.toto.net/class/$1 [R]

        RewriteCond %{HTTP_REFERER}     ^https://(www\.)?toto.net/prod/.*$ [NC]
        RewriteCond %{REQUEST_URI}      !^/prod/.*$ [NC]
        RewriteRule ^/(.*)$             https://www.toto.net/prod/$1 [R]

        RewriteRule ^/prod/(.*)$        http://1.0.0.3/$1 [P,L,NC]
        RewriteRule ^/class/(.*)$       http://1.0.0.2/$1 [P,L,NC]
        RewriteRule ^/totoloc/(.*)$   https://1.0.2.1/totoloc/$1 [P,L,NC]

        RewriteCond %{REQUEST_URI}      !^/sst/.*$ [NC]
        RewriteRule ^/(.*)$             http://1.0.2.1/$1 [P,L]

        #ProxyPassReverse /prod/         http://1.0.0.3/
        #ProxyPassReverse /class/        http://1.0.0.2/
        #ProxyPassReverse /totoloc/    https://1.0.2.1/totoloc/
        #ProxyPassReverse /              http://1.0.2.1/

        SecAuditLog /var/log/apache2/audit.https.toto.net.log
</VirtualHost>

Thanks.

---------------------------------------------------------------------
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