Linuxhotel Wiki

Wie ging das nochmal?

Benutzer-Werkzeuge

Webseiten-Werkzeuge


lpi2:apache-proxy

Apache2 als Reverse-Proxy

siehe auch: apache, apache-ssl

Pakete

debian

apache2

Proxy einschalten

a2enmod proxy_http

Konfigurieren

/etc/apache2/sites-available/proxy.notebook24.linuxhotel.de : (Debian 5.0)

<IfModule mod_proxy.c>

        #turning ProxyRequests on and allowing proxying from all may allow
        #spammers to use your proxy to send email.

        ProxyRequests Off
        ProxyPass / http://www.naturnah.de/
        ProxyPassReverse / http://www.naturnah.de/

        <Proxy *>
                Order deny,allow
                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>
a2ensite proxy.notebook24.linuxhotel.de
/etc/init.d/apache2 force-reload

Apache2 hinter Reverse-Proxy

  # erst in Apache 2.4:
  #ErrorLogFormat "[%{u}t] [%-m:%l] [pid %P:tid %T] %7F: %E: [client\ %a] %M% ,\ referer\ %{Referer}i"
  ErrorLog  /var/log/apache2/webapp.error_log
  LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-agent}i\"" combined_forward
  CustomLog /var/log/apache2/webapp.access_log combined_forward
lpi2/apache-proxy.txt · Zuletzt geändert: 2015/05/08 21:54 (Externe Bearbeitung)