ansible-roles/smartgears/smartgears-nginx-frontend/templates/rstudio-dev.d4science.org-v...

32 lines
840 B
Django/Jinja

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 }}/;
}
}