Skip to content

Instantly share code, notes, and snippets.

@steve-chavez
Created August 1, 2014 19:53
Show Gist options
  • Save steve-chavez/eaaec9459e3c67b642e0 to your computer and use it in GitHub Desktop.
Save steve-chavez/eaaec9459e3c67b642e0 to your computer and use it in GitHub Desktop.
upstream app_server_djangoapp {
server localhost:8002 fail_timeout=0;
}
server {
listen 80;
server_name www.karaokesmart.co;
#server_name ec2-22-214-31-98.us-west-2.compute.amazonaws.com;
location ~ ^/(lgproduccion|prueba)/? {
proxy_set_header HOST www.karaokesmart.com.mx;
proxy_pass http://www.karaokesmart.com.mx;
}
access_log /var/log/nginx/guni-access.log;
error_log /var/log/nginx/guni-error.log info;
keepalive_timeout 5;
# path for static files
root /home/username/webapps/guni/static;
location / {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_redirect off;
if (!-f $request_filename) {
proxy_pass http://app_server_djangoapp;
break;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment