大网数据广告活动
服务器运维问答

Proxy Pass not working

· 52CE 我爱测

I am attempting to get ProxyPass to work on my OpenSUSE 13.1 install. I have tried: a2enmod proxy a2enmod proxy_http a2enmod proxy_connect systemctl restart apache2 systemctl reload apache2 (All combinations of statements to no a…

问题原文

原帖链接 · JosephGarrone · CC BY-SA 3.0

I am attempting to get ProxyPass to work on my OpenSUSE 13.1 install.

I have tried:

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

(All combinations of statements to no avail).

I keep getting the same error over and over:

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 looks like:

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

Does anyone know how to get this ProxyPass statement working?

已采纳解答

原帖链接 · alexus · CC BY-SA 3.0

it looks like proxy_http_module isn't getting loaded, make sure you have following inside of your httpd.conf:

LoadModule proxy_http_module modules/mod_proxy_http.so

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2014-07-22)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。