Invalid Command ProxyErrorOverride

How to solve a problem with ProxyErrorOverride not being recognized.

375 views
d

By. Jacob

Edited: 2024-03-12 18:38

ProxyErrorOverride, Apache mod proxy_http

After installing Apache and trying to start the server, you get an error telling you that ProxyErrorOverride is not a valid command.

A likely cause for this problem is that proxy_http is not enabled.

Reading the status for apache2.service:

Invalid command 'ProxyErrorOverride', perhaps misspelled

Solution:

Enable the proxy_http module by typing the following command:

sudo a2enmod proxy_http

If you later need to disable the module again:

sudo a2dismod proxy_http

Apache modules

You will typically be able to find a list of available HTTP modules in /etc/apache2/mods-available/ for Ubuntu and Debian based distributions, and possibly under /etc/httpd/modules for Arch and Red Hat Enterprise Linux.

Consult the documentation for your GNU/Linux distribution if you want to know the updated and specific location.

The inconsistencies in where files are located can, perhaps, be a bit confusing, but it is up to yourself to account for this. I mainly focus on Ubuntu or Debian in these tutorials.

What is mod_proxy?

mod_proxy is a module that enables various proxy/gateway related features. You should read the official documentation for a more detailed overview; for our intends and purposes, mod_proxy is needed because mod_proxy_fcgi has it as a dependency. Both are needed to enable the FastCGI protocol, which allows Apache to communicate with PHP-FPM, which finally is used to run PHP scripts.

The exact implementation details is of little interest, since this module seem to function fairly effectively with the default fcgi configuration once required modules has been enabled. In fact, I think I have only fiddled with the PHP-FPM pm.max_children configuration, as I mentioned here, and even then you often do not need to make significant changes. The typical website does not get much traffic, and the default settings seem to handle a fair amount of visitors before you have to make adjustments.

Links

  1. Apache Module mod_proxy - httpd.apache.org

Tell us what you think:

  1. This article describes configuration issues caused by Apache mischievously picking a default VHOST without telling the user.
  2. In this Tutorial, it is shown how to redirect all HTTP requests to a index.php file using htaccess or Apache configuration files.
  3. How to enable Apache mod_php using a2enmod, and how to find out what the name of the module is.
  4. How to have files uploaded through SFTP correctly inherit the group permissions of the parent directory.

More in: Apache