38

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?

2 Answers 2

41

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 
2
  • 32
    or a2enmod proxy_http if that's how your Apache works Commented Jun 14, 2015 at 21:34
  • 1
    @Mark you're being redundant, op have same exact line in the question.. Commented Nov 3, 2019 at 14:10
2

make sure that mod_proxy is enabled, and that it is loaded BEFORE mod_proxy_http. Apache doesn’t support dependency management of modules, so they have to be enabled in the appropriate order.

https://docs.docker.com/registry/recipes/apache/

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.