This guide will help you enable gzip compression in AMPPS. Enabling gzip compresses the output hence saving the amount of data transferred and making the results show faster.
-
In order to configure php.ini file go to AMPPS panel click Settings button next to the php version and click Configuration button and open PHP conf file, make following changes.
-
Add zlib.output_handler=On in your php.ini file as shown below.
Configure httpd.conf file
-
In order to configure httpd.conf file go to AMPPS panel click Settings button next to the Apache, click Configuration button and open httpd conf file, make following changes and save the file.
-
Uncomment "mod_defalte.so" and "mod_filter.so" modules by removing # at the beginning of the line as shown below.
-
Add the following block to the end of the httpd.conf file. This block specifies which directories of AMPPS should be served using the gzip compression.
<Directory "{$path}/www">
# Add any file type you want
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE php
NOTE: {$path} refers to AMPPS installation path.
-
Save the httpd.conf file and restart the Apache service from AMPPS panel.