Skip to content

Instantly share code, notes, and snippets.

@xjlu
Created January 25, 2012 20:51
Show Gist options
  • Select an option

  • Save xjlu/1678645 to your computer and use it in GitHub Desktop.

Select an option

Save xjlu/1678645 to your computer and use it in GitHub Desktop.
setup emcee nginx config for self-signed certification
# how to generate self-signed ssl certs.
# http://dracoblue.net/dev/https-nginx-with-self-signed-ssl-certificate/188/
# A sample server configuration for nginx's emcee.conf
server {
listen 443; # for Linux
ssl on;
ssl_certificate /etc/nginx/server.crt;
ssl_certificate_key /etc/nginx/server.key;
client_max_body_size 4G;
server_name emcee.xinjiang.pipe.vitrue.com customer.xinjiang.pipe.vitrue.com;
keepalive_timeout 5;
root /emcee/public;
try_files $uri/index.html $uri.html $uri @app;
location @app {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_pass http://emcee_server;
}
# Rails error pages
error_page 500 502 503 504 /500.html;
location = /500.html {
root /emcee/public;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment