Hi there,
I’m trying to install Kirby on Nginx. I’ve made the changes to the file on site/config/config.php as per the documentation:
c::set('panel.install', true);
Here’s my nginx server block file:
server {
listen 80;
listen [::]:80;
root BLA BLA BLA BLA;
index index.php index.html index.htm index.nginx-debian.html;
server_name BLA BLA BLA BLA;
location / {
try_files $uri $uri/ =404;
}
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/run/php/php7.0-fpm.sock;
}
location ~ /\.ht {
deny all;
}
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/BLA BLA BLA BLA /fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/BLA BLA BLA BLA /privkey.pem; # managed by Certbot
ssl_session_cache shared:le_nginx_SSL:1m; # managed by Certbot
ssl_session_timeout 1440m; # managed by Certbot
ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # managed by Certbot
ssl_prefer_server_ciphers on; # managed by Certbot
ssl_ciphers BLA BLA BLA BLA
if ($scheme != "https") {
return 301 https://$host$request_uri;
} # managed by Certbot
# Redirect non-https traffic to https
# if ($scheme != "https") {
# return 301 https://$host$request_uri;
# } # managed by Certbot
# Don't hint these as folders
rewrite ^/(content|site|kirby)$ /error last;
# block content
rewrite ^/content/(.*).(txt|md|mdown)$ /error last;
# block all files in the site and kirby folder from being accessed directly
rewrite ^/(site|kirby)/(.*)$ /error last;
# removes trailing slashes (prevents SEO duplicate content issues)
if (!-d $request_filename) {
rewrite ^/(.+)/$ /$1 permanent;
}
# panel links
location ~ /panel/ {
try_files $uri $uri/ /panel/index.php?$uri&$args;
}
# site links
location ~ / {
try_files $uri $uri/ /index.php?$uri&$args;
}
# Prevent clients from accessing hidden files (starting with a dot)
# This is particularly important if you store .htpasswd files in the site hierarchy
location ~ (?:^|/)\. {
deny all;
}
# Prevent clients from accessing to backup/config/source files
location ~ (?:\.(?:bak|config|sql|fla|psd|ini|log|sh|inc|swp|dist)|~)$ {
deny all;
}
}
Anyone can help? The rest of the pages work fine on kirby like about/ or contact/ but panel/ wouldnt load.
Thanks in advance.