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:
Here are the two important parts in our nginx config for the Kirby website that get everything up and running:
# site links
location /
{
try_files $uri $uri/ /index.php$is_args$args;
}
# pass the PHP scripts to FastCGI server listening on the php-fpm socket
location ~ \.php$ {
try_files $uri = 404;
fastcgi_pass unix:/var/run/php/php7.2-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fas…
Pauel
May 4, 2020, 3:43pm
3
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)