Nginx Config for Kirby 3

Hi All,

i try to run Kirby 3 with nginx, but every config i tried it doesnt work. Have anyone a woorking config for me?

Thanks

I try this:

server {
listen 80;
server_name danschmid.test;
root /data/websites/kirby;

client_max_body_size 100M;

location / {
    try_files $uri $uri/ /index.php?$query_string;
}

location ~ /panel {
    index index.php;
    try_files $uri $uri/ /panel/index.php?$uri&$args;
}

location ~ \.php$ {
     include snippets/fastcgi-php.conf;
     fastcgi_pass unix:/var/run/php/php7.2-fpm.sock;
     fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
     include fastcgi_params;
}

}

But i get everytime 403 Errors

These settings are the important ones regarding Kirby:

Hi,
could you please post a proven and working nginx configration?
Or is there one somewhere in the documentation that I haven’t found?
I simple don’t get it to work from your response.
Thanks

1 Like

Maybe this “works for me” is helpful: Error 500 on Panel (Nginx, PHP 7.3)