Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Kirby NGINX configuration
##############################
## Kirby configuration
##############################
location /kirby/ {
include /etc/nginx/mime.types;
index index.php;
root /var/www/addons88/;
if (!-e $request_filename){
rewrite ^/kirby/panel/(.*) /kirby/panel/index.php break;
}
if (!-e $request_filename) {
rewrite ^/kirby/(.*)$ /kirby/index.php last;
break;
}
location ~ \.php$ {
try_files $uri =404;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_script_name;
include fastcgi_params;
}
location /kirby/content {
rewrite ^/kirby/content/(.*)\.(txt|md|mdown)$ /kirby/error redirect;
}
location /kirby/site {
rewrite ^/kirby/site/(.*) /kirby/error redirect;
}
location /kirby/kirby {
rewrite ^/kirby/kirby/(.*) /kirby/error redirect;
}
location /kirby/robots {
rewrite ^/kirby/robots.txt /kirby/robots.txt break;
}
}
#############################
## End Kirby CMS configuration
##############################
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.