Code: Select all
server {
server_name localhost 127.0.0.1;
root /var/www/blog/;
index index.php index.html;
location ~ ^/(?:[^/?]*?/|serendipity(?:_admin)?\.(?:JS|css)$|admin$) {
rewrite ^/templates/(.*$) /templates/$1 break;
rewrite ^/([^?]*)$ /index.php?/$1;
rewrite ^/([^?]*?)\?(.*)$ /index.php?/$1&$2;
}
location ~ (.*?).inc.php {
deny all;
}
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;
}
error_page 404 /404.html;
location = /404.html {
root /usr/share/nginx/html/;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html/;
}
listen 80;
listen [::]:80;
}
Code: Select all
2022/03/09 17:01:11 [error] 6476#6476: *873 open() "/var/www/blog/serendipity.js" failed (2: No such file or directory), client: 192.168.122.1, server: localhost, request: "GET /serendipity.js?v=1646857372 HTTP/1.1", host: "192.168.122.242", referrer: "http://192.168.122.242/templates_c/template_cache/bartleby.jpg"
Edit: I've noticed that if I "install" any of the themes and then switch back to another theme, they will then be visible, and I can view the preview images as expected. Basically, the issue only seems to be affecting themes in /templates_c/. Once they're installed and moved into /templates/, they show up just fine.
Edit 2: FIXED! Basically all that was needed was to duplicate the rewrite line for the templates directory specifically for templates_c. Per a discussion with Onli on gitter, I'll document my process and create a pull request on the documentation github repo within the next couple days.