Skip to content

Instantly share code, notes, and snippets.

@toddsby
Forked from ramv/kirby.conf
Last active August 29, 2015 14:17
Show Gist options
  • Save toddsby/49f67b3a1c81794ad412 to your computer and use it in GitHub Desktop.
Save toddsby/49f67b3a1c81794ad412 to your computer and use it in GitHub Desktop.
##############################
## 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