@TobiasP,
I found some time in between some other actions/tasks.
You should have a green button under "Tools & Settings > General Settings > PHP Settings (click)" for both PHP 5.6.20 and PHP 7.0.5.
If you have a grey button, just click on it to activate PHP FPM. Afterwards, go to a domain and select PHP settings: you should be able to change to the "FPM served by Apache" setting.
If that does not work out, just go to the command line and check the status, run: service plesk-php56-fpm status
If that gives you some error notification, then we have to dig deeper.
For that reason, can you also have a look at the installed packages: do you have psa-phpfpm-configurator installed?
Regards....
try_files $uri $uri/ /index.php?$args;
rewrite /wp-admin$ $scheme://$host$uri/ permanent;
location ~ \.(ttf|ttc|otf|eot|woff|woff2|font.css|css|js)$ {
add_header Access-Control-Allow-Origin "*";
}
location = /robots.txt {
auth_basic off; # Whatever happens, always let bots know about your policy
allow all;
log_not_found off; # Prevent excessive log size
access_log off;
}
# Deny all attempts to access hidden files such as .htaccess, .htpasswd, .DS_Store (Mac).
location ~ /\. {
deny all;
access_log off;
log_not_found off;
}
location ~* .(gif)$ {
expires 2592000s;
}
location ~* .(jpeg|jpg)$ {
expires 2592000s;
}
location ~* .(png)$ {
expires 2592000s;
}
location ~* .(css)$ {
expires 604800s;
}
location ~* .(js|jsonp)$ {
expires 604800s;
}
location ~* .(js)$ {
expires 604800s;
}
location ~* .(ico)$ {
expires 31536000s;
}
Well this KB works for me: you can EITHER have nginx serving the files OR setting an expire.Here is another topic for this https://talk.plesk.com/threads/browser-caching-with-nginx-not-working.337315/
I search a solution too for plesk 12.5. That KB not works https://kb.plesk.com/en/128665
@trialotto,
I did exactly what you said.
Left the tick on "Smart static files processing"
Left the tick on "Serve static files directly by nginx"
and removed ico|css|js|gif|jpe?g|png|svg
in Additional nginx directives left only:
location ~* \.(?:ico|css|js|gif|jpe?g|png|svg)$ {
expires 30d;
add_header Cache-Control "public";
}
Put gzip related lines in /etc/nginx/conf.d/custom.conf file.
/meanwhile that's one is a good idea, thank's/
In PHP settings I have PHP 5.16, run PHP as "FPM application served by nginx"
When I set Wordpress permalinks like http://example.com/sample-post and when I try to open some post I get 404 not foud / nginx
When I have in custom nginx directives:
if (!-e $request_filename){
rewrite ^(.*)$ /index.php break;
}
I can use this kind of permalinks http://example.com/sample-post, but without that line I can use only Example Domain like permalinks
Also with or without this rewrite rule I do not have expire headers set in files
1. This issue with permalinks and rewrite rule is only related to Wordpress installs ony with pretty URLs, it work perfect without that rule if you use ugly ULRs.
2. The explanation in my previous post is not OK, because I foud that it relies on .htaccess file for WordPress rewrite rules, which means it falls back to Apache