Skip to content

Instantly share code, notes, and snippets.

@kjprince
Last active January 13, 2021 19:12
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save kjprince/9496593 to your computer and use it in GitHub Desktop.
Save kjprince/9496593 to your computer and use it in GitHub Desktop.
/etc/nginx/nginx.conf
# See this setup: http://polihronov.wordpress.com/
#
#
user www-data;
worker_processes 1;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
# multi_accept on;
}
http {
######
# BASIC SETTINGS
######
sendfile on;
tcp_nopush on;
keepalive_timeout 65;
types_hash_max_size 2048;
server_tokens off;
client_max_body_size 8m;
reset_timedout_connection on;
include /etc/nginx/mime.types;
default_type application/octet-stream;
######
# LOGGING
######
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
error_log /var/log/nginx/error.log warn;
access_log /var/log/nginx/access.log main;
upstream php5-fpm {
server unix:/var/run/php5-fpm.socket;
}
######
# GZIP SETTINGS
######
gzip off;
######
# INCLUDE VIRTUAL HOSTS
######
# include /etc/nginx/conf.d/*.conf;
include /etc/nginx/sites-enabled/*;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment