• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

reverse nginx proxy

Yaashul

New Pleskian
I have set nginx as reverse proxy. I want to serve static content using nginx and php content using apache. So I went to Web Server Settings of my domain and in nginx settings I have enabled
Smart static files processing
Serve static files directly by nginx

now I added following statement in Additional nginx directives

Code:
location ~* \.(?:ico|gif|png|jpe?g|swf|flv|ico|pdf|avi|mov|ppt|doc|mp3|wmv|wav)$ {
expires 30d;
add_header Pragma public;
add_header Cache-Control "public, must-revalidate, proxy-revalidate";
valid_referers none blocked server_names *.facebook.com *.fb.me *.stumbleupon.com *.twitter.com ~\.tumblr\. ~\.pinterest\. ~\.feedburner\. ~\.msn\. ~\.netvibes\. ~\.live\. t.co bit.ly ~\.google\. ~\.bing\. ~\.yahoo\.;
if ($invalid_referer) {
return   403;
}

But the problem I m facing now is no expire header is added to any of those files. What shud I do?
 
Back
Top