Skip to content

Instantly share code, notes, and snippets.

@Denommus
Last active July 31, 2017 18:05
Show Gist options
  • Save Denommus/660baece0b21f534da192810753e3707 to your computer and use it in GitHub Desktop.
Save Denommus/660baece0b21f534da192810753e3707 to your computer and use it in GitHub Desktop.
user auctions;
worker_processes auto;
pid /run/nginx.pid;
events {
worker_connections 768;
# multi_accept on;
}
http {
##
# Basic Settings
##
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;
types_hash_max_size 2048;
# server_tokens off;
# server_names_hash_bucket_size 64;
# server_name_in_redirect off;
include /etc/nginx/mime.types;
default_type application/octet-stream;
##
# SSL Settings
##
ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # Dropping SSLv3, ref: POODLE
ssl_prefer_server_ciphers on;
##
# Logging Settings
##
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
##
# Gzip Settings
##
gzip on;
gzip_disable "msie6";
# gzip_vary on;
# gzip_proxied any;
# gzip_comp_level 6;
# gzip_buffers 16 8k;
# gzip_http_version 1.1;
# gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
##
# Virtual Host Configs
##
include /etc/nginx/conf.d/*.conf;
include /etc/nginx/sites-enabled/*;
proxy_cache_path /var/cache/nginx levels=1:2 keys_zone=STATIC:10m
inactive=24h max_size=1g;
}
#mail {
# # See sample authentication script at:
# # http://wiki.nginx.org/ImapAuthenticateWithApachePhpScript
#
# # auth_http localhost/auth.php;
# # pop3_capabilities "TOP" "USER";
# # imap_capabilities "IMAP4rev1" "UIDPLUS";
#
# server {
# listen localhost:110;
# protocol pop3;
# proxy on;
# }
#
# server {
# listen localhost:143;
# protocol imap;
# proxy on;
# }
#}
Host: myhost
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:54.0) Gecko/20100101 Firefox/54.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: pt-BR,en-US;q=0.7,en;q=0.3
Accept-Encoding: gzip, deflate
Cookie: csrftoken=sometoken; somehugestuff
Connection: keep-alive
Upgrade-Insecure-Requests: 1
Cache-Control: max-age=0
Server: nginx/1.10.0 (Ubuntu)
Date: Mon, 31 Jul 2017 18:02:04 GMT
Content-Type: text/html; charset=utf-8
Content-Length: 7461
Connection: keep-alive
x-powered-by: Craft CMS
charset: utf-8
Vary: Accept-Encoding
Content-Encoding: gzip
server {
listen 8080;
location / {
proxy_pass http://127.0.0.1:8000;
proxy_set_header Host $host;
proxy_ignore_headers Cache-Control Expires Set-Cookie X-Accel-Expires Vary;
proxy_hide_header Cache-Control;
proxy_hide_header Set-Cookie;
#add_header Cache-Control "public";
proxy_cache STATIC;
proxy_cache_valid 200 10m;
proxy_cache_use_stale error timeout invalid_header updating
http_500 http_502 http_503 http_504;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment