habe ein virtuellen Server mit openSuse 10.3 bei 1&1 gemietet. Auf Port 8080 läuft Tomcat, und Apache soll für Tomcat bestimmte Requests weiterleiten. Habe diese Anweisungen in /etc/apache2/vhosts.d/<host>.conf hinzugefügt, wie in der Dokumentation empfohlen wird.
Über ein Proxy-Anweisung funktioniert das auch, aber ich möchte per mod_rewrite eins der Webapps über ein hinzugefügter HTTP-Parameter mitteilen, ob HTTPS zum Einsatz kommt oder nicht. Habe deshalb folgendes meiner Konfiguration hinzugefügt:
Code: Select all
#
# Proxy-Anwesiungen. Diese funktionieren!
#
ProxyRequests Off
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
# Auskommatiert, Weiterleitung soll über mod_rewrite laufen
#ProxyPass /photos http://localhost:8080/photos
#ProxyPassReverse /photos http://localhost:8080/photos
ProxyPass /nibdab http://localhost:8080/nibdab
ProxyPassReverse /nibdab http://localhost:8080/nibdab
#
# Rewrite-Anweisungen. Diese greifen nicht.
#
RewriteEngine on
# Rewrite soll nur gemacht werden, falls Pfad /photos/ beinhaltet
RewriteCond %{REQUEST_URI} ^/photos/
# Parameter "ssl" nur hinzugügen, falls nicht schon vorhanden
RewriteCond %{QUERY_STRING} !^.*ssl= [NC]
# Parameter "ssl=on/off" wird hinzugefügt
RewriteRule ^/photos/(.*)$ http://localhost:8080/photos/$1?ssl=%{HTTPS} [QSA,P,L]
Code: Select all
Starting httpd2 (prefork) [Fri Jun 19 09:39:03 2009] [warn] module rewrite_module is already loaded, skipping
Viele Grüsse,
Ulf
