PageSpeed is a module developed by Google which helps to optimize the page speed of the website. You can install this module in Apache and NGINX server. Below I will detail you about the complete installation and options which can improved the performance of the website.
Before installing this module you can check the performance of the website using the Google Page Insights tool and keep the details so you can check the performance improvement after applying the pagespeed module

Installing PageSpeed Module in Linux

Login to you server using putty

cd /usr/local/src/
sudo wget
yum install at
rpm -U mod-pagespeed-*.rpm

Restart Apache

sudo service httpd restart

Pagespeed Configuration

Pagespeed will install 2 modules “” for Apache2.2 and for Apache2.4
Along with that there will be 2 configuration files pagespeed.conf and pagespeed_libraries.conf

Configuring Mod_Pagespeed Module
In apache the module is on by default. To change the options you can edit the “pagespeed.conf” file located at /etc/httpd/cond.d/

cd /etc/httpd/conf.d/
sudo vi pagespeed.conf

You can enable the module on or off .

ModPagespeed on

You can enable the filters by adding lines which can help you to improve the performance.

ModPagespeedEnableFilters prioritize_critical_css
ModPagespeedEnableFilters defer_javascript
ModPagespeedEnableFilters sprite_images
ModPagespeedEnableFilters rewrite_images
ModPagespeedEnableFilters recompress_png
ModPagespeedEnableFilters convert_png_to_jpeg,convert_jpeg_to_webp
ModPagespeedEnableFilters collapse_whitespace,remove_comments

Verify PageSpeed Module
To verify if pagespeed module is on or not .. you need to perform below command

# curl -D- http:/// | less

HTTP/1.1 200 OK
Date:Sat, 01 Jul 2017 06:27:05 GMT
Server:Apache/2.4.25 (Amazon) PHP/5.6.30


Or you can directly access the website the browser and check the header in the debug tool.

Content-Type:text/html; charset=utf-8
Date:Sat, 01 Jul 2017 06:27:05 GMT
Server:Apache/2.4.25 (Amazon) PHP/5.6.30

After applying this , try the performance of the website in the Google page insights tool . You can further optimize the page by applying more filters. To know more about the other options you can read the full documentation of the options provided in that module Mod Pagespeed Documentation