What do I need to get gzip compression?

I am not a tech person myself and I am trying to learn the system as much as I can. So I need to add gzip to the server so the files are compress and can load faster. There is the .htaccess file in the stats folder, but that’s the file path to only a specific virtual server. I need to enable this globally, how can I do this?

HI, I guess you resolved this already but if not… you need to go webmin - servers - apache - modules and enable desired gzip there. then you will need to restart apache and gzip should be applied right a way

i would like to enable gzip compression on webmin/virtualmin also but i don’t see the modules option.

i have :

Webmin > Servers > Apache Webserver > Select a virtual server > get all kinds of virtual server options but nothing about modules.

Any help would be appreciated.

Hi, you looking in wrong place… you need to go webmin > servers > apache > modules…the module you looking for is called deflate.

hmmm, i’m not sure why, but i don’t see > webmin > servers > apache.

i only see > webmin > servers > Apache Webserver

i am running the latest Webmin 1.830-1

there’s something close to what you’re taking regarding modules at > Webmin > Webmin Configuration > Webmin Modules

but when i click “install from standard module from www.webmin.com”, i don’t see a deflate module in the subsequent list.

i’m on centos 7, so i don’t know if webmin has such a different gui for different linux flavours.

Strange, mod_deflate is part of the core Apache installation so you should check why is missing. Did you upgrade PHP on your server? Anyway, run this “apachectl -t -D DUMP_MODULES |grep deflate” and post the result.

yes i did upgrade php. i have php 5.4, 5.6, 7.0 installed

[root@server ~]# apachectl -t -D DUMP_MODULES |grep deflate deflate_module (shared) [root@server ~]#

How you can see deflate_module (shared) is installed and active. If you have a problem to make it work it means mod_deflate is not configured properly or the problem is somewhere else.

i think that if i try to follow your step in post #2, i get the result in post #3.

i’m not sure why i’m not seeing what you’re seeing.

since I haven’t much luck using virtualmin for this, for centos 7, i found this link:


created the mod_deflate.conf file and put this in it:

[root@server ~]# vi /etc/httpd/conf.d/mod_deflate.conf
<filesMatch “.(js|html|css)$”>
SetOutputFilter DEFLATE

[root@server ~]# systemctl restart httpd

that seems to work.

I have same issue try to enable deflate mod

All the files are where they suppose to but still not working

These steps were followed


Do I needs to check any files in apache2

Or i needs to add in httpd any line