• We value your experience with Plesk during 2024
    Plesk strives to perform even better in 2025. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2024.
    Please take this short survey:

    https://pt-research.typeform.com/to/AmZvSXkx
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

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