Skip to content

Instantly share code, notes, and snippets.

@martin-helmich
Forked from iwyg/neos.dev.conf
Last active August 29, 2015 14:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save martin-helmich/fabe249ab4c4bba04fa5 to your computer and use it in GitHub Desktop.
Save martin-helmich/fabe249ab4c4bba04fa5 to your computer and use it in GitHub Desktop.
server {
listen *:80;
server_name neos.dev;
root /var/www/flow/Web;
autoindex off;
client_max_body_size 0;
access_log /var/log/nginx/flow.dev.access.log;
error_log /var/log/nginx/flow.dev.error.log;
index index.php index.html;
location ~ /\. {
access_log off;
log_not_found off;
deny all;
}
location ~ "^/_Resources/Persistent/" {
access_log off;
log_not_found off;
expires max;
rewrite "(.{40})/.+\.(.+)" /_Resources/Persistent/$1.$2 break;
rewrite "([a-z0-9]+/(.+/)?[a-f0-9]{40})/.+\.(.+)" /_Resources/Persistent/$1.$2 break;
}
location ~ "^/_Resources/" {
access_log off;
log_not_found off;
expires max;
gzip on;
gzip_disable "msie6";
gzip_vary on;
gzip_comp_level 9;
gzip_http_version 1.1;
gzip_types text/css application/x-javascript text/javascript application/octet-stream;
break;
}
location / {
rewrite ".*" /index.php last;
}
try_files $uri $uri/ /index.php?$args;
location ~ \.php$ {
include fastcgi_params;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
fastcgi_param FLOW_CONTEXT Development;
fastcgi_param FLOW_REWRITEURLS 1;
fastcgi_split_path_info ^(.+\.php)(.*)$;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_intercept_errors on;
fastcgi_buffer_size 128k;
fastcgi_buffers 256 16k;
fastcgi_busy_buffers_size 256k;
fastcgi_temp_file_write_size 256k;
}
sendfile off;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment