• 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!
  • 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.

Issue Pass some specific file from nginx to Apache

Wp_SEO

New Pleskian
Hi all,
i'm using Plesk Onyx 17.8 configured with:
Apache with mod_pagespeed
nginx as reverse provxy
In the Apache side, mod_pagespeed provide to generate on the fly css and js optimized like this:

https://domain.com/wp-includes/css/dist/block-library/A.style.min.css.pagespeed.cf.cOBdefHnvQ.css

This url return a 404 error by nginx because nginx try to serve it (for it is a static css file).

If i change this url adding the Apache port it works correctly because will be serve from Apache:

https://domain.com:7081/wp-includes...y/A.style.min.css.pagespeed.cf.cOBdefHnvQ.css

If i check the proxy_error log i found this kind of row:

2019/04/14 00:16:19 [error] 3465#0: *24416 openat() "/var/www/vhosts/domain.it/httpdocs/wp-content/plugins/wysija-newsletters/css/A.validationEngine.jquery.css.pagespeed.cf.jcn-RfgU3K.css" failed (2: No such file or directory), client: 79.52.50.97, server: domain.it, request: "GET /wp-content/plugins/wysija-newsletters/css/A.validationEngine.jquery.css.pagespeed.cf.jcn-RfgU3K.css HTTP/2.0", host: "domain.it", referrer: "https://domain.it/"

where seems that ngix looking for real file on the filesystem.

The question is: how can i add rule in nginx to pass the process this kind of url to Apache?

I tried something like this:

location ~ "\.pagespeed\.([a-z]\.)?[a-z]{2}\.[^.]{10}\.[^.]+" {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header Host $host;
proxy_pass https://domain:7081/$request_uri;
}

but seems to be ignored.

Thanks
 
Back
Top