Close [x]

503 (Service Unavailable) errors accessing Magento software in a web browser

Edit this page on GitHub

503 (Service Unavailable) errors accessing Magento software in a web browser

Symptoms

When you try to access your Magento Admin or storefront in a web browser, you get HTTP 503 (Service Unavailable) errors.

To confirm this issue is not related to maintenance mode, look in your Apache error.log for messages that include:

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

Details

Apache 2.4 changes the way certain directives related to .htaccess work. The Magento software uses .htaccess to rewrite URLs. If .htaccess doesn’t work properly, you cannot access the Magento software in a web browser.

Not all Apache 2.4 distributions have this issue because in some cases, a compatibility module named mod_access_compat is enabled by default. If, however, your Apache 2.4 distribution has this module disabled, you must perform the tasks discussed in the next section. You can also consult the resources listed in the final section in this topic.

Suggested solution

As a user with ‘root’ privileges, enter the following commands:

a2enmod access_compat
service <name> restart

On CentOS, <name> is httpd. On Ubuntu, <name> is apache2.

Additional resources