Created
March 6, 2014 23:49
-
-
Save ramv/9402198 to your computer and use it in GitHub Desktop.
Kirby NGINX configuration
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
############################## | |
## 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