This is a beta release of documentation for Magento 2.4, published for previewing soon-to-be-released functionality. Content in this version is subject to change. Links to the v2.4 code base may not properly resolve until the code is officially released.
You must install Elasticsearch before installing Magento Commerce or Magento Open Source 2.4.0. See Elasticsearch for details.

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

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


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".


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