This commit is contained in:
H.T. Kruitbosch 2017-11-28 15:40:46 +01:00
parent 63884e696b
commit 757270c53f
1 changed files with 39 additions and 39 deletions

View File

@ -176,19 +176,19 @@ You can use nginx to proxy your website, and add https-support (instead of plain
files efficiently. Make sure nginx is installed and configure the website, for example by creating the files efficiently. Make sure nginx is installed and configure the website, for example by creating the
`/etc/nginx/conf.d/yourwebsite.conf` file on centos: `/etc/nginx/conf.d/yourwebsite.conf` file on centos:
# Make sure the port matches # Make sure the port matches
upstream yourwebsiteupstream { upstream yourwebsiteupstream {
server 127.0.0.1:8890; server 127.0.0.1:8890;
} }
# Forward http to https # Forward http to https
server { server {
listen 80; listen 80;
server_name cosmo.service.rug.nl; server_name cosmo.service.rug.nl;
return 301 https://$host$request_uri; return 301 https://$host$request_uri;
} }
server { server {
client_max_body_size 64M; client_max_body_size 64M;
proxy_connect_timeout 300; proxy_connect_timeout 300;
proxy_send_timeout 300; proxy_send_timeout 300;
@ -217,7 +217,7 @@ server {
# the https-part is handled by nginx, and hence not seen by the django SAML2 code. # the https-part is handled by nginx, and hence not seen by the django SAML2 code.
proxy_set_header X_FORWARDED_PROTO https; proxy_set_header X_FORWARDED_PROTO https;
} }
} }
Restart nginx to load the settings `sudo service nginx restart` (or `reload`, to only reload the settings instaed of a Restart nginx to load the settings `sudo service nginx restart` (or `reload`, to only reload the settings instaed of a
full restart) full restart)