Skip to content

Instantly share code, notes, and snippets.

@sewar
Created August 8, 2013 08:43
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sewar/6182820 to your computer and use it in GitHub Desktop.
Save sewar/6182820 to your computer and use it in GitHub Desktop.
Configuration files for timvideos/edid.tv
# Redirect code.* to github code page
server {
listen 80;
server_name code.edid.co code.edid.tv;
rewrite ^(.*) https://github.com/timvideos/edid.tv permanent;
}
# Redirect www.* and alternative domains to main domain
server {
listen 80;
server_name edid.co www.edid.co www.edid.tv;
rewrite ^(.*) http://edid.tv$1 permanent;
}
server {
listen 80;
server_name edid.tv;
root /var/www/edid.tv/static;
autoindex off;
location = /favicon.ico {
log_not_found off;
access_log off;
}
location = /robots.txt {
allow all;
log_not_found off;
access_log off;
}
location ~* \.(js|css|png|jpg|jpeg|gif|ico|eot|woff|ttf|svg)$ {
expires max;
log_not_found off;
}
location / {
include uwsgi_params;
uwsgi_pass unix:/run/uwsgi/app/edid.tv/socket;
}
}
[uwsgi]
virtualenv = /var/www/edid.tv
chdir = /var/www/edid.tv
module = wsgi
processes = 2
master = true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment