Warum erhalte ich beim Starten meines Apache 2.2-Servers die Fehlermeldung „Ungültiger Befehl ‚ProxyPass‘“?

Warum erhalte ich beim Starten meines Apache 2.2-Servers die Fehlermeldung „Ungültiger Befehl ‚ProxyPass‘“?

Ich habe Probleme, das Proxying in Apache 2.2 zum Laufen zu bringen

Wenn ich versuche, es zu starten, erhalte ich eine Invalid command 'ProxyPass'Fehlermeldung. Das würde bedeuten, dass es proxy_http_modulenicht geladen wird. Wenn ich mir jedoch den Debug anschaue, scheint es da zu sein. Beispiel:

E:\Apache\bin>httpd -e debug
[Fri Aug 21 15:48:55 2015] [debug] mod_so.c(246): loaded module actions_module
...
[Fri Aug 21 15:48:55 2015] [debug] mod_so.c(246): loaded module proxy_ajp_module
[Fri Aug 21 15:48:55 2015] [debug] mod_so.c(246): loaded module proxy_http_module   <-----
[Fri Aug 21 15:48:55 2015] [debug] mod_so.c(246): loaded module setenvif_module
....
[Fri Aug 21 15:48:55 2015] [debug] mod_so.c(246): loaded module jk_module
[Fri Aug 21 15:48:55 2015] [notice] Disabled use of AcceptEx() WinSock2 API
Syntax error on line 84 of E:/Apache/conf/extra/httpd-ssl.conf:
Invalid command 'ProxyPass', perhaps misspelled or defined by a module not included
in the server configuration

Für mich sieht es also so aus, als würde proxy_http_module geladen. Ich verstehe nicht, warum es nicht weiß, was ProxyPass ist.

httpd.confIch habe es auf jeden Fall in meiner Datei aktiviert

#LoadModule mime_magic_module modules/mod_mime_magic.so
LoadModule negotiation_module modules/mod_negotiation.so
#LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_ajp_module modules/mod_proxy_ajp.so
#LoadModule proxy_balancer_module modules/mod_proxy_balancer.so
#LoadModule proxy_connect_module modules/mod_proxy_connect.so
#LoadModule proxy_ftp_module modules/mod_proxy_ftp.so
LoadModule proxy_http_module modules/mod_proxy_http.so     # <--------------
#LoadModule rewrite_module modules/mod_rewrite.so

Hinweis: Ich versuche dies über eine SSL-Verbindung zu tun, damit ich httpd-ssl.confauch später in meiner httpd.confDatei lade

<IfModule ssl_module>
Include conf/extra/httpd-ssl.conf
SSLRandomSeed startup builtin
SSLRandomSeed connect builtin
</IfModule>

Dann httpd-ssl.confhabe ich einen VirtualHost-Eintrag eingerichtet

<VirtualHost _default_:443>
    DocumentRoot "E:/Apache/htdocs"
### dummy IP
    ServerName 127.12.34.56:443
    ServerAdmin [email protected]
    ErrorLog "E:/Apache/logs/error.log"
    TransferLog "E:/Apache/logs/access.log"

    #ProxyRequests Off
### It chokes on the following entry
    ProxyPass / http://myfirewalledserver:80/
    #ProxyPassReverse / http://myfirewalledserver:80/
</VirtualHost>                                  

Was habe ich hier verpasst?

Antwort1

proxy_httpModul erfordertProxy, UndProxyPassDie Richtlinie ist in letzterem definiert.

Stellen Sie sicher, dass es auch geladen ist.

Dank an Milind Singh

Laden Sie das Modul durch Ausführen

Run sudo a2enmod proxy_http

verwandte Informationen