user nntmux; worker_processes 1; daemon off; error_log /dev/stderr; #error_log logs/error.log notice; #error_log logs/error.log info; #pid logs/nginx.pid; events { worker_connections 1024; } http { include mime.types; default_type application/octet-stream; types_hash_max_size 4096; server_names_hash_bucket_size 128; # 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 /dev/stdout; sendfile on; # tcp_nopush on; keepalive_timeout 65; gzip on; server { listen 80; root /site/public; server_name _; index index.php index.html index.htm; # add_header 'Access-Control-Allow-Origin' "$http_origin"; # add_header 'Access-Control-Allow-Credentials' 'true'; # add_header 'Access-Control-Allow-Methods' 'GET, POST, PUT, DELETE, OPTIONS'; # add_header 'Access-Control-Allow-Headers' 'Accept,Authorization,Cache-Control,Content-Type,DNT,If-Modified-Since,Keep-Alive,Origin,User-Agent,X-Mx-ReqToken,X-Requested-With'; fastcgi_read_timeout 86400; location ~* \.(?:css|eot|gif|gz|ico|inc|jpe?g|js|ogg|oga|ogv|mp4|m4a|mp3|png|svg|ttf|txt|woff|xml)$ { expires max; add_header Pragma public; add_header Cache-Control "public, must-revalidate, proxy-revalidate"; } location / { try_files $uri $uri/ /index.php?$query_string; } location ~* \.(?:css|eot|gif|gz|ico|inc|jpe?g|js|ogg|oga|ogv|mp4|m4a|mp3|png|svg|ttf|txt|woff|xml)$ { expires max; add_header Pragma public; add_header Cache-Control "public, must-revalidate, proxy-revalidate"; } location ^~ /covers/ { # This is where the nZEDb covers folder should be in. root /site/resources; } location ~ \.php$ { include fastcgi_params; fastcgi_ignore_client_abort on; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $request_filename; fastcgi_param SERVER_NAME $http_host; fastcgi_param HTTPS on; fastcgi_pass unix:/run/php-fpm/php-fpm.sock; fastcgi_split_path_info ^(.+\.php)(/.+)$; try_files $uri =404; } } } # vim: ft=nginx