• 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

Question PLESK "Nginx only" configuration (cache control, expires, static content)

Dukemaster

Regular Pleskian
Hi at all,
would be nice if we could make a discussion about the PLESK provided option "nginx without Apache" and help each other to improve ourselves in configuration.

My Plesk domain webserver settings are NGINX ONLY, static files and PHP 7.1.8 FPM also only nginx. (Pagespeed is also installed for Nginx from source, but it's absolutely unimportant for this thread)

After reading and testing uncountable documents and advices for Nginx and Plesk I came to the conclusion that all current documentation refers to the standard configuration Apache with nginx as frontend (proxy server). Or, if nginx alone, then it's without PLESK.
Is there anybody out who has experiences with NGINX as standalone with PLESK serving PHP 7.1 FPM and also static content?
First I posted a similar thread in Off topics, BUT in this case it is absolutely Plesk-related. Perhaps @UFHH01, @IgorG or @TimReeves have some inspiration, so if they want.

How and where has configuration to be placed. E.g. settings for Cache control max. age?
By tests everything was without success, not in /etc/nginx/nginx.conf server (http) nor in additional nginx settings under domain settings. Perhaps creating a custom php file?

Lots of Greets (Welcome back UFHH01, forum missed you) ;)
 
Last edited:
How and where has configuration to be placed. E.g. settings for Cache control max. age?
By tests everything was without success, not in /etc/nginx/nginx.conf server (http) nor in additional nginx settings under domain settings. Perhaps creating a custom php file?
Why you can't define it in Additional nginx directives? Like it is described in this KB article, for instance: [How to] Enable cache expiration in nginx
 
Hi at all,
would be nice if we could make a discussion about the PLESK provided option "nginx without Apache" and help each other to improve ourselves in configuration.

My Plesk domain webserver settings are NGINX ONLY, static files and PHP 7.1.8 FPM also only nginx. (Pagespeed is also installed for Nginx from source, but it's absolutely unimportant for this thread)

After reading and testing uncountable documents and advices for Nginx and Plesk I came to the conclusion that all current documentation refers to the standard configuration Apache with nginx as frontend (proxy server). Or, if nginx alone, then it's without PLESK.
Is there anybody out who has experiences with NGINX as standalone with PLESK serving PHP 7.1 FPM and also static content?
First I posted a similar thread in Off topics, BUT in this case it is absolutely Plesk-related. Perhaps @UFHH01, @IgorG or @TimReeves have some inspiration, so if they want.

How and where has configuration to be placed. E.g. settings for Cache control max. age?
By tests everything was without success, not in /etc/nginx/nginx.conf server (http) nor in additional nginx settings under domain settings. Perhaps creating a custom php file?

Lots of Greets (Welcome back UFHH01, forum missed you) ;)

Here the additional directives I use :
Code:
# Cache static files
location ~* \.(ogg|ogv|svg|svgz|eot|otf|woff|mp4|ttf|css|js|jpg|jpeg|gif|png|ico|zip|tgz|gz|rar|bz2|doc|xls|exe|ppt|tar|mid|midi|wav|bmp|rtf|swf|webp)$ {
  add_header "Access-Control-Allow-Origin" "*";
  access_log off;
  log_not_found off;
  expires 30d;
}

But you have to make sure expires directive isn't removed by ngx_pagespeed module
 
Back
Top