I’ve been struggling to get Kirby 3 up and running on a Digital Ocean box that’s using Nginx. All the appropriate pages are appearing but the Media is giving me a “500 (Internal Server Error)” in dev tools. The url’s to the images is correct. All files permissions and ownership are as they should be.
As well as 500 errors I cannot get the panel to appear at all.
Is there a complete example of an Nginx config that we should be using for Nginx? - I found one for Kirby 3 and 2 elsewhere in the forum but they were not sufficient
This worked for resolving all the urls with nginx file but my main issue that I found was actually file permissions and ownership. This article really helped:
For those not familiar with the “pretty standard stuff”: make sure you include client_max_body_size 32M; or some other value if you want to upload files larger than 2M.
I am still having problems getting Kirby 3 running on a NGINX server.
The site is showing up, but no image will load, and also I can’t access the panel. It will just say
The panel assets cannot be installed properly. Please check permissions of your media folder.
This page has no styling at all – it is all written in a serif font. All permissions for the folders are set, though (content, media, site/accounts, site/sessions).
Any ideas?
My server block looks like this
server {
root /var/www/MY_DOMAIN.com/html;
server_name MY_DOMAIN.com www.MY_DOMAIN.com;
index index.php index.html index.htm index.nginx-debian.html;
# 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 fastcgi_params;
}
listen [::]:443 ssl; # managed by Certbot
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/MY_DOMAIN.com/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/MY_DOMAIN.com/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
}
server {
if ($host = www.MY_DOMAIN.com) {
return 301 https://$host$request_uri;
} # managed by Certbot
if ($host = MY_DOMAIN.com) {
return 301 https://$host$request_uri;
} # managed by Certbot
listen 80;
listen [::]:80;
server_name MY_DOMAIN.com www.MY_DOMAIN.com;
return 404; # managed by Certbot
}