Skip to content

Instantly share code, notes, and snippets.

@iwyg
Created September 25, 2014 13:11
Show Gist options
  • Save iwyg/4c8c0c0dec21dcfc8969 to your computer and use it in GitHub Desktop.
Save iwyg/4c8c0c0dec21dcfc8969 to your computer and use it in GitHub Desktop.
nginx config for typo3 neos
server {
listen *:80;
server_name neos.dev;
root /var/www/neos/Web;
autoindex off;
access_log /var/log/nginx/neos.dev.access.log;
error_log /var/log/nginx/neos.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;
break;
}
location / {
rewrite ".*" /index.php last;
}
try_files $uri $uri/ /index.php?$args;
location ~ \.php$ {
include fastcgi_params;
fastcgi_pass 127.0.0.1:9000;
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;
}
@pwalter
Copy link

pwalter commented Jan 7, 2016

According to the Release Notes for Flow 3.0 (http://flowframework.readthedocs.org/en/stable/TheDefinitiveGuide/PartV/ReleaseNotes/300.html?highlight=nginx) these two lines need to be removed:

rewrite "(.{40})/.+\.(.+)" /_Resources/Persistent/$1.$2 break;
rewrite "([a-z0-9]+/(.+/)?[a-f0-9]{40})/.+\.(.+)" /_Resources/Persistent/$1.$2 break;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment