Apache2 not starting - Error Invalid command 'ProxyRequests'

I was hoping to get some guidance on the following issue I am having. When I try to start my apache2 server I get the following error.

user@kali:~# service apache2 start
Job for apache2.service failed because the control process exited with error code.
See "systemctl status apache2.service" and "journalctl -xe" for details.

So this is what I do next.

user@kali:~# journalctl | tail
Jan 21 01:19:32 kali pulseaudio[839]: E: [alsa-sink-ES1371/1] alsa-sink.c: Most likely this is a bug in the ALSA driver 'snd_ens1371'. Please report this issue to the ALSA developers.
Jan 21 01:19:32 kali pulseaudio[839]: E: [alsa-sink-ES1371/1] alsa-sink.c: We were woken up with POLLOUT set -- however a subsequent snd_pcm_avail() returned 0 or another value < min_avail.
Jan 21 01:19:35 kali systemd[1]: Starting The Apache HTTP Server...
Jan 21 01:19:35 kali apachectl[1355]: AH00526: Syntax error on line 1 of /etc/apache2/sites-enabled/ajp.conf:
Jan 21 01:19:35 kali apachectl[1355]: Invalid command 'ProxyRequests', perhaps misspelled or defined by a module not included in the server configuration
Jan 21 01:19:35 kali apachectl[1355]: Action 'start' failed.
Jan 21 01:19:35 kali apachectl[1355]: The Apache error log may have more information.
Jan 21 01:19:35 kali systemd[1]: apache2.service: Control process exited, code=exited status=1
Jan 21 01:19:35 kali systemd[1]: apache2.service: Failed with result 'exit-code'.
Jan 21 01:19:35 kali systemd[1]: Failed to start The Apache HTTP Server.

I pull up the ajp.conf file and this is what it shows.

ProxyRequests Off
# Only allow localhost to proxy requests
<Proxy *>
Order deny,allow
Deny from all
Allow from localhost
</Proxy>
# Change the IP address in the below lines to the remote servers IP address hosting the Tomcat instance
ProxyPass / ajp://**.**.*.***:8009/
ProxyPassReverse / ajp://**.**.*.***:8009/

2 Answers

I was hoping to get some guidance on the following issue I am having.

The answer is indicated by the error message:

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

ProxyRequests is not misspelled, so probably you are not loading modules/mod_proxy.so

In httpd.conf, change:

#LoadModule proxy_module modules/mod_proxy.so

To:

LoadModule proxy_module modules/mod_proxy.so
4

I had this problem too.Invalid command 'ProxyPass', perhaps misspelled or defined by a module not included in the server configurationI am using these commands to enable apache mods

sudo a2enmod proxy
sudo a2enmod proxy_http
sudo a2enmod proxy_ajp
sudo a2enmod proxy_balancer
sudo a2enmod proxy_connect
sudo a2enmod proxy_html

And at the end run this command to restart apache.

sudo systemctl restart apache2
1

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like