代理通行证不起作用


21

我正在尝试让ProxyPass在我的OpenSUSE 13.1安装上工作。

我试过了:

a2enmod proxy
a2enmod proxy_http
a2enmod proxy_connect
systemctl restart apache2
systemctl reload apache2

(所有语句组合无济于事)。

我不断收到相同的错误:

SERVER:/etc/apache2 # apache2ctl start -f /etc/apache2/httpd-proxy.conf
AH00526: Syntax error on line 4 of /etc/apache2/httpd-proxy.conf:
Invalid command 'ProxyPass', perhaps misspelled or defined by a module not included in the server configuration

httpd-proxy.conf看起来像:

<VirtualHost *:80>
    DocumentRoot /srv/www/subsite
    ServerName www.site.com/subsite
    ProxyPass /subsite/ http://localhost:81
    ProxyPassReverse /subsite/ http://localhost:81
</Virtualhost>

有谁知道如何使该ProxyPass语句正常工作?

Answers:


27

好像proxy_http_module没有被加载,请确保您的内容如下httpd.conf

LoadModule proxy_http_module modules/mod_proxy_http.so

18
或者a2enmod proxy_http这就是您的Apache的工作方式
马克

@马克你是多余的,op在问题中有相同​​的
说法

By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.