TYPO3 Flow nginx rewrite rules.
Tested on nginx 1.4 and nginx 1.2.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 |
server { listen 80; server_name hostname; error_log /var/www/flow/logs/error.log debug; access_log /var/www/flow/logs/access.log combined; root /var/www/flow/Web; index index.html index.php; location ~ ^/_Resources/Persistent/ { rewrite "^/(_Resources/Persistent/.{40})/.+(\..+)" /$1$2 break; } location ~ ^/_Resources/ { access_log off; log_not_found off; expires max; break; } location ~* /favicon.ico { access_log off; log_not_found off; break; } location ~* /\.ht { deny all; access_log off; log_not_found off; break; } location / { try_files $uri $uri/ /index.php?$args; } location ~ \.php { fastcgi_split_path_info ^(.+\.php)(/.+)$; fastcgi_pass 127.0.0.1:9000; include /etc/nginx/fastcgi_params; fastcgi_index index.php; fastcgi_param FLOW_CONTEXT Development; fastcgi_param FLOW_REWRITEURLS 1; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param SCRIPT_NAME $fastcgi_script_name; fastcgi_read_timeout 30m; } } |
Reply