Skip to content
Snippets Groups Projects
Commit 65169a8b authored by iaibrys's avatar iaibrys
Browse files

Remove chat from nginx

parent 09fc20b4
No related branches found
No related tags found
No related merge requests found
...@@ -600,55 +600,3 @@ server { ...@@ -600,55 +600,3 @@ server {
} }
<% end %> <% end %>
#
# Chat
#
<% if enabled_features[:chat] %>
upstream chat {
least_conn;
server chat:3000 weight=10 max_fails=3 fail_timeout=30s;
}
server {
# for websockets: https://www.nginx.com/blog/websocket-nginx/
# port to listen on. Can also be set to an IP:PORT
listen 8443 ssl;
# Set the max size for file uploads to 50Mb
client_max_body_size 50M;
# sets the domain[s] that this vhost server requests for
server_name chat-enote<%= enote_domain_suffix %>;
ssl_certificate <%= ssl_certificates["chat-enote#{enote_domain_suffix}"][:cert] %>;
ssl_certificate_key <%= ssl_certificates["chat-enote#{enote_domain_suffix}"][:key] %>;
proxy_ssl_ciphers HIGH:!aNULL:!MD5;
# vhost specific access log
access_log /var/log/nginx/nginx.vhost.access.log main;
location /socket_io {
proxy_pass http://chat;
proxy_http_version 1.1;
proxy_set_header 'Access-Control-Allow-Origin' '*';
proxy_set_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
proxy_set_header 'Access-Control-Allow-Headers' 'User-Agent,Keep-Alive,Content-Type';
proxy_set_header 'Access-Control-Expose-Headers' 'Content-Length,Content-Range';
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
location / {
proxy_pass http://chat;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_http_version 1.1;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto https;
proxy_redirect off;
}
}
<% end %>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment