• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • We are looking for U.S.-based freelancer or agency working with SEO or WordPress for a quick 30-min interviews to gather feedback on XOVI, a successful German SEO tool we’re looking to launch in the U.S.
    If you qualify and participate, you’ll receive a $30 Amazon gift card as a thank-you. Please apply here. Thanks for helping shape a better SEO product for agencies!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Question Nginx + Mod_pagespeed

Nicolas Boada

New Pleskian
Hi folks,

I just moved from WHM to Plesk panel everything's running smoothly but I'm trying to add mod_pagespeed to my current configuration and can't get it to work.

I enabled the module using the command "plesk sbin nginx_modules_ctl --enable pagespeed" but when I check on Is mod_pagespeed working? it says "Fail! Mod_Pagespeed is not running on that domain."

I will really appreciate if someone knows how to fix it :).

Attached screenshots of PHP Settings and Apache & Nginx settings.

Server info: CentOS Linux 7.6, Plesk Onyx 17.8.11

Thanks in advance!!
 

Attachments

  • nginx.png
    nginx.png
    461.1 KB · Views: 52
  • php.png
    php.png
    493.5 KB · Views: 39
Last edited:
Hey Nicolas,
Have you activated pagespeed in Additional nginx directives? If not, go to domains -> apache & nginx settings -> Additional nginx directives and add:

pagespeed on;

# Needs to exist and be writable by nginx. Use tmpfs for best performance.
pagespeed FileCachePath /var/cache/ngx_pagespeed_cache;
pagespeed EnableFilters combine_css,combine_javascript,combine_heads,convert_meta_tags,recompress_images;

# Ensure requests for pagespeed optimized resources go to the pagespeed handler
# and no extraneous headers get set.
location ~ "\.pagespeed\.([a-z]\.)?[a-z]{2}\.[^.]{10}\.[^.]+" {
add_header "" "";
}
location ~ "^/pagespeed_static/" { }
location ~ "^/ngx_pagespeed_beacon$" { }

Also, made sure that user "nginx" is the owner of /var/cache/ngx_pagespeed_cache.
Try and let me know if it works.
 
Hey Nicolas,
Have you activated pagespeed in Additional nginx directives? If not, go to domains -> apache & nginx settings -> Additional nginx directives and add:

pagespeed on;

# Needs to exist and be writable by nginx. Use tmpfs for best performance.
pagespeed FileCachePath /var/cache/ngx_pagespeed_cache;
pagespeed EnableFilters combine_css,combine_javascript,combine_heads,convert_meta_tags,recompress_images;

# Ensure requests for pagespeed optimized resources go to the pagespeed handler
# and no extraneous headers get set.
location ~ "\.pagespeed\.([a-z]\.)?[a-z]{2}\.[^.]{10}\.[^.]+" {
add_header "" "";
}
location ~ "^/pagespeed_static/" { }
location ~ "^/ngx_pagespeed_beacon$" { }

Also, made sure that user "nginx" is the owner of /var/cache/ngx_pagespeed_cache.
Try and let me know if it works.
Now is working perfectly, thank you very much Viorel!
 
Hello Nicolas, just a quick question, do you use an additional caching plugin on your website or Just Apache + Nginx with Pagespeed? I'm also looking for an Option to get more performance for my domains

Thx
Sally
 
Hello Nicolas, just a quick question, do you use an additional caching plugin on your website or Just Apache + Nginx with Pagespeed? I'm also looking for an Option to get more performance for my domains

Thx
Sally
Hey Sally,

I'm using nginx (without Apache) + phpfpm 7.2 + memcache + w3 total cache.
After trying mod_pagespeed, a few of my sites started showing some errors so I deactivated it.
 
Hello Nicolas,

thanks for your reply. I use the BPS Pro Security Plugin what creates htaccess rules, and for Caching WP Rocket. I need to keep my config with Apache for mod_rewrite and as reverse Proxy Nginx. mod_pagespeed would not really than be a good choice, when it start to make trouble :)

Don't know, if other Community Members here in the Forum can give some advice how to extend my config to get a bit more performance for my websites.

Thx
Sally
 
Back
Top