user www-data; worker_processes 4; error_log /var/log/nginx/error.log; pid /var/run/nginx.pid; events { worker_connections 1024; } http { include /etc/nginx/mime.types; default_type application/octet-stream; log_format main '$remote_addr - $remote_user [$time_local] "$request" ' '$status $body_bytes_sent "$http_referer" ' '"$http_user_agent" "$http_x_forwarded_for"'; access_log /var/log/nginx/access.log main; sendfile on; tcp_nopush on; tcp_nodelay on; types_hash_max_size 2048; keepalive_timeout 65; gzip on; client_max_body_size 50M; # ssl_certificate /etc/nginx/cert.crt; # ssl_certificate_key /etc/nginx/cert.key; # ssl_ciphers EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH; # ssl_protocols TLSv1.1 TLSv1.2; server { listen 80; listen [::]:80; server_name lizmap.local; root /srv/lizmap/www; index index.html index.php; access_log /var/log/nginx/lizmap_access.log; error_log /var/log/nginx/lizmap_error.log; # URI resolved to web sub directory # and found a index.php file here location ~* /(\w+/)?\w+\.php { fastcgi_split_path_info ^(.+\.php)(/.+)$; set $path_info $fastcgi_path_info; # because of bug http://trac.nginx.org/nginx/ticket/321 try_files $fastcgi_script_name =404; include fastcgi_params; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param SERVER_NAME $http_host; fastcgi_param PATH_INFO $path_info; fastcgi_param PATH_TRANSLATED $document_root$path_info; fastcgi_pass lizmap:9000; } } }