Skip to content

Instantly share code, notes, and snippets.

@rgorsuch
Created June 16, 2016 15:08
Show Gist options
  • Save rgorsuch/603673d536ed1e8be39ef99105ab5a32 to your computer and use it in GitHub Desktop.
Save rgorsuch/603673d536ed1e8be39ef99105ab5a32 to your computer and use it in GitHub Desktop.
user www-data;
worker_processes auto;
error_log /var/log/nginx/error.log warn;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
multi_accept on;
use epoll;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
charset utf-8;
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;
log_not_found off;
upstream scte {
server scte1.vagrant.test:5000;
server scte2.vagrant.test:5000;
}
server {
listen 80;
location / {
proxy_pass http://scte;
}
}
# Speed up file transfers by using sendfile() to copy directly
# between descriptors rather than using read()/write().
#sendfile on;
# Tell Nginx not to send out partial frames; this increases throughput
# since TCP frames are filled up before being sent out. (adds TCP_CORK)
tcp_nopush on;
# How long to allow each connection to stay idle; longer values are better
# for each individual client, particularly for SSL, but means that worker
# connections are tied up longer. (Default: 65)
keepalive_timeout 20;
# Hide Nginx version information
server_tokens off;
# Don't allow iframes to render the page
add_header X-Frame-Options SAMEORIGIN;
# Don't allow content sniffing
add_header X-Content-Type-Options nosniff;
# Enable XSS filter (if not by default in browser)
add_header X-XSS-Protection "1; mode=block";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment