mybuddy/etc/nginx.conf

53 lines
1.2 KiB
Nginx Configuration File
Raw Permalink Normal View History

2017-11-13 21:21:33 +00:00
worker_processes 1;
daemon off;
events {
worker_connections 1024;
}
http {
include /data/etc/nginx/mime.types;
sendfile on;
gzip on;
gzip_http_version 1.0;
gzip_proxied any;
gzip_min_length 500;
gzip_disable "MSIE [1-6]\.";
gzip_types text/plain text/xml text/css
text/comma-separated-values
text/javascript
application/x-javascript
application/atom+xml;
# Proxy upstream to the gunicorn process
upstream django {
server 127.0.0.1:8000;
}
# Configuration for Nginx
server {
# Listen on port 8080
listen 8080;
# Settings to serve static files
location ^~ /static/ {
root /app/;
}
# Serve a static file (ex. favico)
# outside /static directory
location = /favico.ico {
root /app/favico.ico;
}
# Proxy connections to django
location / {
proxy_pass http://django;
proxy_redirect off;
proxy_set_header Host $host;
}
}
}