Skip to content

Instantly share code, notes, and snippets.

@davidkeen
Last active August 29, 2015 14:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save davidkeen/4b56a1333caf112097ec to your computer and use it in GitHub Desktop.
Save davidkeen/4b56a1333caf112097ec to your computer and use it in GitHub Desktop.
AMEE nginx vhost (http)
upstream amee-platform {
server 127.0.0.1:8888;
}
upstream amee-platform-secure {
server 127.0.0.1:8889;
}
server {
listen 80;
server_name amee.example.com;
location / {
proxy_pass http://amee-platform;
proxy_set_header Host $http_host;
proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504;
proxy_redirect off;
proxy_buffering off;
#Ip addresses to allow
#http://nginx.org/en/docs/http/ngx_http_access_module.html
#allow 127.0.0.1;
#allow 82.69.60.5;
#deny all;
}
location /nginx_stub_status {
stub_status on;
allow 127.0.0.1;
deny all;
}
}
server {
listen 443;
server_name amee.example.com;
ssl on;
ssl_certificate /etc/ssl/certs/example.crt;
ssl_certificate_key /etc/ssl/certs/example.key;
location / {
proxy_pass http://amee-platform-secure;
proxy_set_header Host $http_host;
proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504;
proxy_redirect off;
proxy_buffering off;
#Ip addresses to allow
#http://nginx.org/en/docs/http/ngx_http_access_module.html
#allow 127.0.0.1;
#allow 82.69.60.5;
#deny all;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment