Pagekit by YOOtheme - NGINX rules failed

Hello, guys.

EE => php7

NOTE: I’m using HTTPS

ssl on;
listen 443 ssl http2;
listen [::]:443 ssl http2;

I have tried to use this @ /var/www/my.domain.tld/conf/nginx/pagekit.conf:

rewrite ^/index\.php/?(.*)$ /$1;
try_files $uri @index;
location ~* \.(db|ht)$ {
    deny all;
}
location ~* \.(?:ico|css|js|gif|jpe?g|png|ttf|woff)\$ {
    access_log off;
    expires 30d;
    add_header Pragma public;
    add_header Cache-Control "public, mustrevalidate, proxy-revalidate";
}
location ~ \.php$ {
    try_files $uri =404;
    fastcgi_pass unix:/var/run/php5-fpm.sock;
    fastcgi_index index.php;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    include fastcgi_params;
    fastcgi_param  HTTP_MOD_REWRITE  On;
 }

What I’m doing wrong?

The original htaccess from Pagekit @ Github

Solutions without EasyEngine => solution one and solution two. None works fine here. The Pagekit was installed, but the /index.php/ still there. Can you help me, please?

Thank you.

I don’t know about other rules, but if you use PHP7, you cannot use this line anymore:

fastcgi_pass unix:/var/run/php5-fpm.sock;

it should be

fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;

1 Like

I have been changed the fastcgi_pass to php7.0-fpm.sock The problem persist: the rewrite rules.

You need to check you main file en /etc/nginx/sites-enabled/domain.conf

My first thought is that locations.conf is loaded so you have the same locations and thats a no go in nginx.