Hello,
i post this as question because i’m pretty sure its not a bug…
I want to test Kirby (latest from git) so i put it on my webserver (rpi3 // nginx version: nginx/1.10.1 // PHP 7.0.9-1 (fpm-fcgi) )
But when i try to open it in my Browser (Chrome // FF) it downloads the index.php instead of rendering it(returns a 304). (Cache cleared, tried incognito mode)
First i thought i did something wrong with my site-config
server {
######
# Basic Setup
######
listen 80;
listen [::]:80;
server_name kirby.my-url.de;
root /home/dev/www/kirby.my-url.de/public/;
index index.php;
autoindex off;
charset UTF-8;
location / {
# First attempt to serve request as file, then
# as directory, then fall back to displaying a 404.
try_files $uri $uri/ =404;
}
######
# /Basic Setup
######
######
# /Kirby Setup from https://gist.github.com/bastianallgeier/c2e1f1e519f5f2943ec4
######
# 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;
access_log off;
log_not_found off;
}
# Prevent clients from accessing to backup/config/source files
location ~ (?:\.(?:bak|config|sql|fla|psd|ini|log|sh|inc|swp|dist)|~)$ {
deny all;
access_log off;
log_not_found off;
}
######
# /Kirby Setup
######
######
# Ext Setup
######
# Cache static files
location ~* \.(ogg|ogv|svg|svgz|eot|otf|woff|mp4|ttf|css|rss|atom|js|jpg|jpeg|gif|png|ico|zip|tgz|gz|rar|bz2|doc|xls|exe|ppt|tar|mid|midi|wav|bmp|rtf|swf)$ {
add_header "Access-Control-Allow-Origin" "*";
access_log off;
log_not_found off;
expires max;
}
# Deny backup extensions & log files
location ~* ^.+\.(bak|log|old|orig|original|php#|php~|php_bak|save|swo|swp|sql|sqlite)$ {
deny all;
access_log off;
log_not_found off;
}
# Return 403 forbidden for readme.(txt|html) or license.(txt|html) or example.(txt|html)
if ($uri ~* "^.+(readme|license|example)\.(txt|html)$") {
return 403;
}
# Deny access to any files with a .php extension in the uploads directory
# Works in sub-directory installs and also in multisite network
location ~* /(?:uploads|files)/.*\.php$ {
deny all;
}
# Dont track access on favicon.ico
location = /favicon.ico {
log_not_found off;
access_log off;
}
# Dont track access on robots.txt
location = /robots.txt {
allow all;
log_not_found off;
access_log off;
}
######
# /Ext Setup
######
###
# PHP Setup
###
location ~ \.php$ {
try_files $uri =404;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_script_name;
include fastcgi_params;
}
###
# /PHP Setup
###
}
or with my sophos config for the Site:
Typ: Reiner Text (HTTP)
Domänen: kirby.my-url.de
Echte Webserver: aktiv my-url.de
Erweitert: Host-Header passieren lassen
Komprimierungsunterstützung deaktiviert
But it’s not different to the other sites I host…
Does anyone of you has an idea what i’m doing wrong?
Thanks