ZeroEnna
Erfahrenes Mitglied
Hallo zusammen
Ich setzte seit kurzem einen Apache2 mit mod_proxy als Reverse Proxy. Da in manchen PHP-Scripts die Variable $_SERVER['PHP_SELF'] eingesetzt wird und diese den URL für den lokalen Server und nicht den vom Reverse Proxy ausgibt, filtere ich die Ausgabe noch mit Hilfe von mod_proxy_html.
Das Problem ist aber, dass mir das Modul immer das HTML-Dokument verändert. Sieht der Head bevor er in den Filter kommt noch so aus:
sieht das Ganze nachdem es den Filter durchlaufen hat wie folgt aus:
Also, wie ihr seht löscht es mir die Doctype-Angabe und schreibt den gesamten Head auf eine Zeile.
Seit ihr auch schon auf das Problem gestossen und weiss eventuell jemand woran das liegt und wie man es lösen kann?
Die Konfiguration sieht wie folgt aus:
Das Laden des Moduls:
Die Proxy Konfiguration:
Gruss
ZeroEnna
Ich setzte seit kurzem einen Apache2 mit mod_proxy als Reverse Proxy. Da in manchen PHP-Scripts die Variable $_SERVER['PHP_SELF'] eingesetzt wird und diese den URL für den lokalen Server und nicht den vom Reverse Proxy ausgibt, filtere ich die Ausgabe noch mit Hilfe von mod_proxy_html.
Das Problem ist aber, dass mir das Modul immer das HTML-Dokument verändert. Sieht der Head bevor er in den Filter kommt noch so aus:
HTML:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link rel="stylesheet" type="text/css" href="../../css/style.css" />.....
</head>
HTML:
<html xmlns="http://www.w3.org/1999/xhtml"><head><link rel="stylesheet" type="text/css" href="../../css/style.css">...</head>
Seit ihr auch schon auf das Problem gestossen und weiss eventuell jemand woran das liegt und wie man es lösen kann?
Die Konfiguration sieht wie folgt aus:
Das Laden des Moduls:
Code:
LoadModule proxy_module /usr/lib/apache2/modules/mod_proxy.so
LoadFile /usr/lib/libxml2.so.2
LoadModule proxy_html_module /usr/lib/apache2/modules/mod_proxy_html.so
<IfModule mod_proxy.c>
#turning ProxyRequests on and allowing proxying from all may allow
#spammers to use your proxy to send email.
ProxyRequests Off
SSLProxyEngine On
<Proxy *>
AddDefaultCharset off
Order deny,allow
#Deny from all
Allow from all
</Proxy>
# Enable/disable the handling of HTTP/1.1 "Via:" headers.
# ("Full" adds the server version; "Block" removes all outgoing Via: headers)
# Set to one of: Off | On | Full | Block
ProxyVia On
</IfModule>
Code:
ProxyPass /pfad http://intern.server
ProxyPassReverse /pfad http://intern.server
<Location /pfad>
SetOutputFilter proxy-html
ProxyHTMLURLMap http://intern.server http://extern.server/pfad
</Location>
ZeroEnna