If you follow along with the entire series of article for Virtualmin Installation, you probably wish to optimize your setup. What works for me is using Mod_pagespeed.
What is Mod_pagespeed?
Mod_pagespeed is an open source Apache module that is used to automatically optimize web pages. It makes the web faster by rewriting web pages to reduce latency and bandwidth. Mod_pagespeed also provides many optimization filters that are used to optimize various files such as css, html, png, and jpg.
sudo dpkg -i mod-pagespeed-stable_current_amd64.deb && sudo apt-get -f install
Selecting previously unselected package mod-pagespeed-stable. (Reading database ... 183231 files and directories currently installed.) Preparing to unpack mod-pagespeed-stable_current_amd64.deb ... Unpacking mod-pagespeed-stable (18.104.22.168-r0) ... Setting up mod-pagespeed-stable (22.214.171.124-r0) ... Enabling module pagespeed. To activate the new configuration, you need to run: systemctl restart apache2 Enabling conf pagespeed_libraries. To activate the new configuration, you need to run: systemctl reload apache2
sudo systemctl restart apache2
You can verify the Mod_pagespeed module by running the following curl command:
curl -D- localhost
If everything was successful, you will see the following output:
HTTP/1.1 200 OK Date: Mon, 28 Nov 2016 15:28:51 GMT Server: Apache/2.4.7 (Ubuntu) Accept-Ranges: bytes Vary: Accept-Encoding X-Mod-Pagespeed: 126.96.36.199-0 Cache-Control: max-age=0, no-cache Content-Length: 10724 Content-Type: text/html; charset=UTF-8
Alternatively, you may visit a domain that is hosted on your Droplet and see the Response Headers as shown below:
At this point, you should be all set.
Installing From Packages