Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- server {
- listen 80;
- server_name chive.local;
- ## Parameterization using hostname of access and log filenames.
- access_log /home/www/chive.local/log/access.log;
- error_log /home/www/chive.local/log/error.log;
- root /home/www/chive.local/htdocs;
- index index.php index.html;
- ## Support for favicon. Return a 204 (No Content) if the favicon
- ## doesn't exist.
- location = /favicon.ico {
- try_files /favicon.ico =204;
- }
- location / {
- location ~ ^(?<script>.+\.php)(?<path_info>.*)$ {
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- include fastcgi_params;
- fastcgi_buffers 256 4k;
- fastcgi_intercept_errors on;
- fastcgi_read_timeout 14400;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME $document_root$script;
- fastcgi_param SCRIPT_NAME $script;
- fastcgi_param PATH_INFO $path_info;
- fastcgi_pass backend;
- }
- location /protected {
- internal;
- }
- location /yii {
- internal;
- }
- location ~* .+\.(?:css|gif|htc|js|jpe?g|png|swf)$ {
- expires max;
- ## No need to bleed constant updates. Send the all shebang in one
- ## fell swoop.
- tcp_nodelay off;
- ## Set the OS file cache.
- open_file_cache max=100 inactive=120s;
- open_file_cache_valid 45s;
- open_file_cache_min_uses 2;
- open_file_cache_errors off;
- }
- }
- ## We need to capture the case where the index.php is missing,
- ## hence we drop out of the path info thingie.
- location ~* /([^\.])$ {
- return 302 /index.php/$1;
- }
- ## Close up git repo access.
- location ^~ /.git {
- return 404;
- }
- } # server
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement