Skip to content

Instantly share code, notes, and snippets.

@pedrommone
Last active December 17, 2015 00:26
Show Gist options
  • Save pedrommone/092963573f6b95e27132 to your computer and use it in GitHub Desktop.
Save pedrommone/092963573f6b95e27132 to your computer and use it in GitHub Desktop.
server {
resolver 169.254.169.250 8.8.8.8 8.8.4.4 valid=300s;
client_max_body_size 20M;
listen 80 default_server;
root /data/www/public;
index index.php index.html index.htm;
location / {
try_files $uri $uri/ /index.html /index.php?$query_string;
}
location ~ \.php$ {
include fastcgi_params;
fastcgi_pass phpfpm_backend;
fastcgi_param SCRIPT_FILENAME $request_filename;
}
location ~ /\.ht {
deny all;
}
}
user www-data;
worker_processes 4;
pid /run/nginx.pid;
daemon off;
events {
worker_connections 768;
# multi_accept on;
}
http {
upstream phpfpm_backend {
server fpm:9000;
}
##
# Basic Settings
##
sendfile off;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;
types_hash_max_size 2048;
# server_names_hash_bucket_size 64;
# server_name_in_redirect off;
include /etc/nginx/mime.types;
default_type application/octet-stream;
##
# Logging Settings
##
access_log /data/logs/access.log;
error_log /data/logs/error.log warn;
##
# Gzip Settings
##
gzip on;
gzip_disable "msie6";
include /etc/nginx/conf.d/*.conf;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment