Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
NGINX Virtual Host for NEOS 2.0/FLOW3
server {
listen 80;
server_name domain.tld;
root /usr/share/nginx/domain.tld/Web;
autoindex off;
access_log /var/log/nginx/$host-access.log;
error_log /var/log/nginx/$host-error.log error;
index index.php;
location ~ /\. {
access_log off;
log_not_found off;
deny all;
location ~ "^/_Resources/Persistent/" {
access_log off;
log_not_found off;
expires max;
# Removed for FLOW3
#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;
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;

This comment has been minimized.

Copy link
Owner Author

@typomedia typomedia commented Mar 25, 2016

If you have PHP7 installed use:
fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;

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