Skip to content

Instantly share code, notes, and snippets.

@myungseokang
Created July 27, 2017 13:05
Show Gist options
  • Save myungseokang/cabde849981c90eacdb6eac27bc19627 to your computer and use it in GitHub Desktop.
Save myungseokang/cabde849981c90eacdb6eac27bc19627 to your computer and use it in GitHub Desktop.
Nginx Configuration file
server {
listen 80;
server_name example.com www.example.com;
location = /favicon.ico { access_log off; log_not_found off; }
location /static {
# STATIC ROOT
alias /home/ubuntu/(project_dir)/staticfiles;
expires -1;
}
location / {
include uwsgi_params;
uwsgi_pass unix:///tmp/(project_dir).sock;
}
location /robots.txt {
add_header Content-Type text/plain;
return 200 "User-agent: *\nDisallow: /\n";
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment