Update nginx conf
This commit is contained in:
parent
edf703aa78
commit
e9ec8cea05
1 changed files with 26 additions and 16 deletions
|
|
@ -35,6 +35,9 @@ http {
|
||||||
server <%="localhost:#{port}"%>;
|
server <%="localhost:#{port}"%>;
|
||||||
<% end %>
|
<% end %>
|
||||||
}
|
}
|
||||||
|
upstream resque_web {
|
||||||
|
server "localhost:5678";
|
||||||
|
}
|
||||||
|
|
||||||
server {
|
server {
|
||||||
listen 843;
|
listen 843;
|
||||||
|
|
@ -50,6 +53,24 @@ http {
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
server {
|
||||||
|
listen 80;
|
||||||
|
server_name resque.<%= @url %>;
|
||||||
|
rewrite ^(.*) https://resque.<%= @url %>$1 permanent;
|
||||||
|
}
|
||||||
|
server {
|
||||||
|
|
||||||
|
listen 443;
|
||||||
|
server_name resque.<%= @url %>;
|
||||||
|
|
||||||
|
ssl on;
|
||||||
|
ssl_certificate /usr/local/nginx/conf/diaspora.crt;
|
||||||
|
ssl_certificate_key /usr/local/nginx/conf/diaspora.key;
|
||||||
|
|
||||||
|
location / {
|
||||||
|
proxy_pass http://resque_web;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
server {
|
server {
|
||||||
listen 80;
|
listen 80;
|
||||||
|
|
@ -85,24 +106,13 @@ http {
|
||||||
if (!-f $request_filename) {
|
if (!-f $request_filename) {
|
||||||
proxy_pass http://thin_cluster;
|
proxy_pass http://thin_cluster;
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
server {
|
|
||||||
|
|
||||||
listen 443;
|
error_page 500 502 503 504 /50x.html;
|
||||||
server_name <%= @url %> resque.<%= @url %>;
|
location = /50x.html {
|
||||||
|
root html;
|
||||||
ssl on;
|
}
|
||||||
ssl_certificate <%= @cert_location %>;
|
|
||||||
ssl_certificate_key <%= @key_location %>;
|
|
||||||
|
|
||||||
proxy_pass localhost:5678
|
|
||||||
}
|
|
||||||
|
|
||||||
error_page 500 502 503 504 /50x.html;
|
|
||||||
location = /50x.html {
|
|
||||||
root html;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue