hello,
I’m using Kirby 3 with a docker setup (nginx / php-fpm).
When I open the panel, the page loads but all assets (CSS/JS) are not loaded:
I don’t quite understand how Kirby defines the path to the assets. (I guess the hash value results from the particular version?).
I have the following structure for this project:
/
├─ kirby/
│ └─ panel
│ └─ dist
│ └─ css
│ └─ img
│ └─ js
├─ public/
│ └─ index.php // entry point of web server
├─ site/
├─ storage/
the index.php
has this content:
<?php
include __DIR__ . '/../vendor/autoload.php';
$kirby = new \Kirby\Cms\App([
'roots' => [
// 'index' => __DIR__,
'kirby' => __DIR__ . '/../kirby',
'site' => __DIR__ . '/../site',
'storage' => __DIR__ . '/../storage',
'content' => __DIR__ . '/../storage/content',
'media' => __DIR__ . '/../storage/media',
'accounts' => __DIR__ . '/../storage/accounts',
'cache' => __DIR__ . '/../storage/cache',
'sessions' => __DIR__ . '/../storage/sessions',
],
]);
echo $kirby->render();
my nginx config is the following:
server {
listen 80 default_server;
listen [::]:80;
index index.php index.html;
server_name localhost;
root /app/public;
client_max_body_size 1024M;
default_type text/plain;
add_header X-Content-Type-Options nosniff;
rewrite ^\/(content|site|kirby)/(.*)$ /error last;
rewrite ^\/\.(?!well-known\/) /error last;
location / {
try_files $uri $uri/ /index.php$is_args$args;
}
location ~* \.php$ {
#fastcgi.conf
fastcgi_param GATEWAY_INTERFACE CGI/1.1;
fastcgi_param SERVER_SOFTWARE nginx;
fastcgi_param QUERY_STRING $query_string;
fastcgi_param REQUEST_METHOD $request_method;
fastcgi_param CONTENT_TYPE $content_type;
fastcgi_param CONTENT_LENGTH $content_length;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
fastcgi_param REQUEST_URI $request_uri;
fastcgi_param DOCUMENT_URI $document_uri;
fastcgi_param DOCUMENT_ROOT $document_root;
fastcgi_param SERVER_PROTOCOL $server_protocol;
fastcgi_param REMOTE_ADDR $remote_addr;
fastcgi_param REMOTE_PORT $remote_port;
fastcgi_param SERVER_ADDR $server_addr;
fastcgi_param SERVER_PORT $server_port;
fastcgi_param SERVER_NAME $server_name;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param SERVER_PORT 8080;
try_files $uri =404;
fastcgi_pass php;
}
}
Does anyone have any tips on what I need to change to get the panel to load correctly?