diff --git a/chef/cookbooks/common/files/default/iptables b/chef/cookbooks/common/files/default/iptables index 7fa13a0aa667b7275795e35985a9feeabf5d738f..345df7a19a7d5d6c1a869a1b4944014801f46960 100644 --- a/chef/cookbooks/common/files/default/iptables +++ b/chef/cookbooks/common/files/default/iptables @@ -16,7 +16,7 @@ #HTTPS -A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 443 -j ACCEPT #Resque-Web --A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 5678 -j ACCEPT +-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 7894 -j ACCEPT #Websocket -A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 8080 -j ACCEPT #Crossdomain policy file for Flash sockets diff --git a/chef/cookbooks/common/templates/default/nginx.conf.erb b/chef/cookbooks/common/templates/default/nginx.conf.erb index e294d49078d09f36e576720cf49b62bcc957241f..c06963b53c266031999d48f6e5ce84cb5b673012 100644 --- a/chef/cookbooks/common/templates/default/nginx.conf.erb +++ b/chef/cookbooks/common/templates/default/nginx.conf.erb @@ -36,6 +36,10 @@ http { <% end %> } + upstream resque_web { + server localhost:5678; + } + server { listen 843; @@ -51,6 +55,23 @@ http { } + server { + listen 7894; + server_name <%= @url %> www.<%= @url %>; + + auth_basic "Restricted"; + auth_basic_user_file htpasswd; + + ssl on; + ssl_certificate /usr/local/nginx/conf/diaspora.crt; + ssl_certificate_key /usr/local/nginx/conf/diaspora.key; + + location / { + proxy_set_header Host $http_host; + proxy_pass http://resque_web; + } + } + server { listen 80; server_name <%= @url %> www.<%= @url %>;