Apache 2.2x – Use & Instructions for Magento 2.0

In the previous section, we’ve discussed earlier about Magento Apache 2.4 rewrites and also configured the .htaccess file. So in this article, we’ll learn to enable the Magento Apache 2.2 rewrites. And so will declare a setting for .htaccess the distributed CONFIG file.

However in the month of February 2018, we’d like to share love with our clients until 1st March, 2018. So, enjoy free premium services like website transfer, performance audit & development support all month long absolutely free with us. So, hurry before the valentines promo ends!

Tanzia Farin Chy for Aspiration Hosting

As similar to Magento Apache 2.4, 2.2 also uses an .htaccess file and server rewrites. Precisely to give Directory level instructions to Apache 2.2.

Here Note: On the storefront we’ll see no styles displaying if fail to enable these settings.

Magento Apache 2.2 rewrites & .htaccess file config:

Simply follow the path to open the mentioned file to configure. Here below are the different paths to follow for both Ubuntu & CentOS:

Ubuntu: vim /etc/apache2/sites-available/default

CentOS: vim /etc/httpd/conf/httpd.conf

Now let’s navigate and find the tier that begins with the following:

Ubuntu 12: <Directory /var/www/>

Ubuntu 14 or CentOS: <Directory /var/www/html>

Next edit the value of AllowOverride into <value from Apache site>. Here following is an example for Ubuntu 12 users.

<Directory /var/www/>

Options Indexes FollowSymLinks MultiViews

AllowOverride <value from Apache site>

Order allow,deny

Allow from all


In each case the past values for order may not work. And again follow the Apache documentation for further details.

Finally exit the text editor by saving the file.

Incase using Ubuntu, to use the mod_rewrite module we need to configure Apache. Here use the following commands to configure Apache:

cd /etc/apache2/mods-enabled

ln -s ../mods-available/rewrite.load

Last but not least, restart Apache if you made any changes to it. Simply use the following command to restart Apache.

service apache2 restart

Again Note: On the storefront we’ll see no styles displaying if fail to enable these settings.

Now reading Part 02 | Part 01  | Part 03