Skip to content

Instantly share code, notes, and snippets.

@davidbanham
Created October 19, 2012 04:24
Show Gist options
  • Save davidbanham/3916231 to your computer and use it in GitHub Desktop.
Save davidbanham/3916231 to your computer and use it in GitHub Desktop.
Example nginx conf
server {
listen localhost:81;
location /RPC2 {
auth_basic "Restricted";
auth_basic_user_file htpasswd;
include scgi_params;
scgi_pass localhost:5000;
}
}
server {
listen 80;
location /incoming/ {
proxy_pass http://localhost:3000/incoming/;
include /etc/nginx/proxy.conf;
}
location / {
return 301 https://$host$request_uri;
}
}
server {
listen 443;
ssl on;
ssl_certificate /etc/nginx/server.crt;
ssl_certificate_key /etc/nginx/server.key;
location / {
proxy_pass http://localhost:3000/;
include /etc/nginx/proxy.conf;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment