Apache required modules
Adobe Commerce requires the following Apache modules to be installed:
Verify the Apache version
To verify the Apache version that you’re currently running, enter:
The result displays similar to the following:
-
If Apache is not installed, see:
Installing or upgrading Apache on Ubuntu
The following sections discuss how to install or upgrade Apache:
- Install Apache
- Upgrade to Apache 2.4 on Ubuntu to use PHP 7.4.
Installing Apache on Ubuntu
To install the default version of Apache:
-
Install Apache
-
Verify the installation.
The result displays similar to the following:
-
Enable rewrites and
.htaccess
.
Upgrading Apache on Ubuntu
To upgrade to Apache 2.4:
-
Add the
ppa:ondrej
repository, which has Apache 2.4: -
Install Apache 2.4:
NOTE
If the ‘apt-get install’ command fails because of unmet dependencies, consult a resource like https://askubuntu.com/. -
Verify the installation.
Messages similar to the following should display:
-
Enable rewrites and
.htaccess
.
Installing Apache on CentOS
Adobe Commerce requires Apache server rewrites. You must also specify the type of directives that can be used in .htaccess
, which the application uses to specify rewrite rules.
Installing and configuring Apache is basically a three-step process: install the software, enable rewrites, and specify .htaccess
directives.
Installing Apache
-
Install Apache 2.4 if you have not already done so.
-
Verify the installation:
Messages similar to the following display to confirm that the installation was successful:
-
Continue with the next section.
NOTE
Even if Apache 2.4 is provided by default with CentOS, see the following section to configure it.
Enable rewrites and .htaccess for CentOS
-
Open
/etc/httpd/conf/httpd.conf
file for editing: -
Locate the block that starts with:
-
Change the value of
AllowOverride
toAll
.For example,
NOTE
The preceding values forOrder
might not work in all cases. For more information, see the Apache documentation (2.4). -
Save the file and exit the text editor.
-
To apply Apache settings, restart Apache.
Enable rewrites and .htaccess for Ubuntu
-
Open
/etc/apache2/sites-available/default
file for editing: -
Locate the block that starts with:
<Directory "/var/www/html">
-
Change the value of
AllowOverride
toAll
.For example:
-
Save the file and exit the text editor.
-
Configure Apache to use the
mod_rewrite
module: -
Restart Apache to apply changes:
Solving 403 (Forbidden) errors
If you encounter 403 Forbidden errors when trying to access the site, you can update your Apache configuration or your virtual host configuration to enable visitors to the site:
Solving 403 Forbidden errors for Apache 2.4
To enable website visitors to access your site, use one of the Require directives.
For example:
Order
might not work in all cases. For more information, see the Apache documentation.More help on this topic
Adobe Commerce at Summit
Register for these sessions:
- How AI Is Transforming the Commerce Landscape (attend online)
- B2B Reimagined: Transforming Go-to-Market Strategies for Profitable Growth (attend online)
- Put the Customer at the Center and Build Relationships That Last a Lifetime (attend online)
- Elevate and Empower Teams with Agentic AI for Exceptional Experiences (attend online)
- How the United States' Top Restaurant Chain Built a Digital Growth Engine
Connect with Experience League at Summit!
Get front-row access to top sessions, hands-on activities, and networking—wherever you are!
Learn more