Last active
January 2, 2016 08:09
-
-
Save micahhausler/8275006 to your computer and use it in GitHub Desktop.
NGINX configuration for a Django heartbeat.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
listen 10.10.10.10:80; | |
server_name demo.ambition.io; | |
location /heartbeat { | |
set $my_host $host; | |
if ($host ~ "\d+\.\d+\.\d+\.[\d\:]+") { | |
set $my_host "demo.ambition.io"; | |
} | |
uwsgi_param HTTP_HOST $my_host; | |
include uwsgi_params; | |
uwsgi_pass 127.0.0.1:1111; | |
access_log /var/log/nginx/demo.ambition.io.heartbeat.log buffer=128k; | |
} | |
location / { | |
include uwsgi_params; | |
uwsgi_pass 127.0.0.1:1111; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment