Created
April 21, 2012 14:51
-
-
Save robcee/2437511 to your computer and use it in GitHub Desktop.
Sample BrowserID + Nginx + Proxy setup (can work for node, django, flask, etc)
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
upstream gunicorn_frontends { | |
# We define the binding of the gunicorn web server | |
server 127.0.0.1:8000; | |
} | |
# we need to redirect www since browserid thinks www and non-www are different | |
server { | |
listen 80; | |
server_name www.yourdomain.com; | |
rewrite ^ http://yourdomain.com$uri permanent; | |
} | |
server { | |
listen 80; | |
server_name yourdomain.com; | |
access_log /var/www/yourdomain.com/logs/access.log; | |
error_log /var/www/yourdomain.com/logs/error.log; | |
location / { | |
proxy_pass_header Server; | |
proxy_set_header Host $http_host; | |
proxy_set_header X-Forward-For $proxy_add_x_forwarded_for; | |
proxy_redirect off; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header X-Scheme $scheme; | |
proxy_pass http://gunicorn_frontends; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment