library/roles/smartgears/smartgears-nginx-frontend: Add websockets support to the virtualhost. Remove the rstudio virtualhost templates.

This commit is contained in:
Andrea Dell'Amico 2016-10-08 12:28:08 +02:00
parent cc6a29ce51
commit b0e799ad17
3 changed files with 8 additions and 32 deletions

View File

@ -42,6 +42,10 @@ server {
# Proxy stuff # Proxy stuff
include /etc/nginx/snippets/nginx-proxy-params.conf; include /etc/nginx/snippets/nginx-proxy-params.conf;
{% if nginx_websockets_support %}
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
{% endif %}
{% if r_connector_install %} {% if r_connector_install %}
location /auth-sign-in { location /auth-sign-in {
@ -119,6 +123,10 @@ server {
# Proxy stuff # Proxy stuff
include /etc/nginx/snippets/nginx-proxy-params.conf; include /etc/nginx/snippets/nginx-proxy-params.conf;
{% if nginx_websockets_support %}
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
{% endif %}
{% if r_connector_install %} {% if r_connector_install %}
location /auth-sign-in { location /auth-sign-in {
rewrite ^/auth-sign-in http://{{ item.servername }}/r-connector/gcube/service/disconnect; rewrite ^/auth-sign-in http://{{ item.servername }}/r-connector/gcube/service/disconnect;

View File

@ -1,31 +0,0 @@
server {
listen {{ http_port }};
server_name {{ ansible_fqdn }};
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
proxy_read_timeout 600;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto http;
proxy_set_header Host $http_host;
proxy_redirect off;
location /auth-sign-in {
rewrite ^/auth-sign-in http://{{ ansible_fqdn }}/r-connector/gcube/service/disconnect;
}
{% for instance in tomcat_m_instances %}
{% for context in instance.app_contexts %}
location /{{ context }} {
proxy_pass http://localhost:{{ item.http_port }}/{{ context }};
}
{% endfor %}
{% endfor %}
location / {
proxy_pass http://localhost:{{ rstudio_http_port }}/;
}
}

View File

@ -1 +0,0 @@
rstudio-dev.d4science.org-virtualhost.j2