apache

Apache: Invalid command ProxyRequests


I setup a new Vhost for jenkins:

<VirtualHost *:80>
    ServerAdmin webmaster@localhost
    ServerName ci.company.com
    ServerAlias ci
    ProxyRequests Off
    <Proxy *>
        Order deny,allow
        Allow from all
    </Proxy>
    ProxyPreserveHost on
    ProxyPass / http://localhost:8080/
</VirtualHost>

...which uses proxy and when i restart apache I get error like this:

Invalid command 'ProxyRequests', perhaps misspelled or defined by a module not included in the server configuration

Solution

  • You should enable proxy. Run a command:

     sudo a2enmod proxy
     sudo /etc/init.d/apache2 restart