我正在尝试让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语句正常工作?
a2enmod proxy_http
这就是您的Apache的工作方式