ws420 edited a comment on issue #1681: Uncacheable content, preventing 
rewriting of image
URL: 
https://github.com/apache/incubator-pagespeed-ngx/issues/1681#issuecomment-594181431
 
 
   > Well...
   > Where the plesk panel put these directives? in a vhost config file? If 
yes, you don´t need to set the pagespeed directives in the htacces again.
   
   I added some directives in plesk panel and this file was updated:
   /var/www/vhosts/system/weedstreet420.com/conf/vhost_ssl.conf
   
   > This:
   > # Header set Cache-Control "no-store, no-cache, must-revalidate, max-age=0"
   > makes all resources uncacheable, so pagespeed can´t optimize it. You need 
to enable it, but with some like:
   > Header set Cache-Control "max-age=86400, public"
   > This make resources cacheable for 1 day, so pagespeed can optimize it and 
when optimized, it changes to 1 year.
   
   We have a lot of dynamic content on the website that needs to be updated 
every 5 minutes or so (news and live market data). Does this means that 
everything will be cached for 1 day on the website? We are looking to cache 
only the images, css, js
   
   Edit: I modified the .htaccess with this line and it broke the entire 
website again (css/js/img 404)
   Header set Cache-Control "max-age=3600, public"
   
   > I think nginx still working, as far I can see the header x-pagespeed that 
is set by nginx.
   > If the working module of pagespeed is in apache server these header must 
be X-Mod-Pagespeed.
   
   I'm confused. I have no idea what's going on. If I disable nginx in Plesk it 
doesn't work.
   
![image](https://user-images.githubusercontent.com/48076840/75821430-409b6b80-5d6c-11ea-909f-058544686cb6.png)
   You would think the settings above would completely disable nginx but 
instead is seems that it disables apache and runs only on nginx! As soon as I 
disable the proxy mode, the htaccess stops working and the url rewriting 
returns 404 errors on all wordpress pages. So I am forced to keep the "proxy 
mode" option checked
   
   According to Plesk documentation this is supposed to be the correct way to 
disable nginx and serve all files with Apache: 
https://docs.plesk.com/en-US/obsidian/customer-guide/72320/
   
   I also tried via the CLI:
   `plesk bin domain -u weedstreet420.com -nginx-serve-php false`
   
   > 
   > Ah! your site is https, so you need to configure fechthttps or 
loadfromfile.
   > By default, pagespeed tries to fecht resources by http, and maybe the 404 
error´s you see is for don´t have the https enabled.
   > 
   > ModPagespeedFetchHttps enable
   
   We tried enabling FetchHttps but the entire website will return an Internal 
Server Error as soon as it's enabled
   
   Edit: nvm, the internal server error shows up only when FetchHttps is 
enabled in the htaccess.
   If I put FetchHttps in Plesk apache directive, there's no server error
   However, I am still stuck at the same place. The entire website is broken 
and all resources are 404
   
![image](https://user-images.githubusercontent.com/48076840/75823618-121f8f80-5d70-11ea-9703-1b02cc719039.png)
   
![image](https://user-images.githubusercontent.com/48076840/75823634-1cda2480-5d70-11ea-97a7-ea5eebfdbdb1.png)
   
![image](https://user-images.githubusercontent.com/48076840/75823689-34191200-5d70-11ea-8d1c-0224f53d66f7.png)
   
   Images are returning a 404 error from Nginx even if it's supposed to be 
disabled. This is so confusing.
   
![image](https://user-images.githubusercontent.com/48076840/75826811-5877ed00-5d76-11ea-9362-6b69d3daba1c.png)
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to