D
Deleted member 209767
Guest
- Server operating system version
- AlmaLinux
- Plesk version and microupdate number
- latest
We have this problem on 5 servers running mod_pagespeed. The images are being converted to webp, but mod_pagespeed is rewriting the file name, and it changes continuously. This means that google indexes our webp images, and those images are lost after a few days when the file changes to a different name. This is negatively impacting our SEO.
To prevent this problem, mod_pagespeed is supposed to add a rel=canonical header to the requests. But somehow this header is lost between Apache and Nginx
When making a curl request directly to Apache without nginx proxy, I can see the header:
But when doing the same request to nginx proxy, the "Link" header is lost, same when checking in the dev console. Of course I tried to disable Cloudflare and all caching stuff, reset htaccess, remove anything modifying the headers, etc...
In Plesk, Smart static files processing is disabled, as recommended when running mod_pagespeed
We have been trying to fix this issue for months, and would appreciate some help! Thanks
To prevent this problem, mod_pagespeed is supposed to add a rel=canonical header to the requests. But somehow this header is lost between Apache and Nginx
When making a curl request directly to Apache without nginx proxy, I can see the header:
# curl -lv http://www.mysite.com:7080/someimage.png.pagespeed.ic.zDk0iIUL8D.webp
* Trying 167.114.64.16...
* TCP_NODELAY set
* Connected to www.mysite.com (167.114.64.16) port 7080 (#0)
> GET /someimage.png.pagespeed.ic.zDk0iIUL8D.webp HTTP/1.1
> Host: www.mysite.com:7080
> User-Agent: curl/7.61.1
> Accept: */*
>
< HTTP/1.1 200 OK
< Date: Tue, 21 Mar 2023 18:21:51 GMT
< Server: Apache
< Last-Modified: Wed, 15 Jun 2022 04:20:48 GMT
< Accept-Ranges: bytes
< Content-Length: 3438
< Link: <http://www.mysite.com:7080/someimage.png>; rel="canonical"
< X-Content-Type-Options: nosniff
< Expires: Tue, 21 Mar 2023 18:26:51 GMT
< Cache-Control: max-age=300,private
< Vary: Accept-Encoding
< Connection: close
< Content-Type: image/png
But when doing the same request to nginx proxy, the "Link" header is lost, same when checking in the dev console. Of course I tried to disable Cloudflare and all caching stuff, reset htaccess, remove anything modifying the headers, etc...
In Plesk, Smart static files processing is disabled, as recommended when running mod_pagespeed
We have been trying to fix this issue for months, and would appreciate some help! Thanks