Skip to content

Instantly share code, notes, and snippets.

@domgetter
Created July 1, 2014 15:05
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 domgetter/e6705d363f52508b620c to your computer and use it in GitHub Desktop.
Save domgetter/e6705d363f52508b620c to your computer and use it in GitHub Desktop.
<% site_urls.each do |su| %>
server {
listen 443 ssl;
server_name <%= su %>;
location /app {
alias /opt/greendale/www/app;
}
location /static {
alias /opt/greendale/static;
}
location /api {
include uwsgi_params;
uwsgi_pass uwsgicluster;
uwsgi_read_timeout 1200;
client_max_body_size 50M;
}
location / {
rewrite ^/$ /app/index.html permanent;
rewrite ^/index.html?$ /app/index.html;
}
ssl on;
ssl_certificate /etc/nginx/ssl/certificates/<%= su %>.crt;
ssl_certificate_key /etc/nginx/ssl/certificates/<%= su %>.key;
}
<% end %>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment