... | ... | @@ -7,27 +7,23 @@ server { |
|
|
server_name web0.fhnw.ch;
|
|
|
return 301 https://web0.fhnw.ch$request_uri;
|
|
|
error_log /var/log/nginx/web0.fhnw.ch-error.log debug;
|
|
|
location / {
|
|
|
root /usr/share/nginx/dist;
|
|
|
index index.html index.htm;
|
|
|
}
|
|
|
location /hook/ {
|
|
|
proxy_pass http://localhost:5000;
|
|
|
}
|
|
|
|
|
|
include /etc/nginx/conf.d/locations/*.conf;
|
|
|
|
|
|
error_page 500 502 503 504 /50x.html;
|
|
|
location = /50x.html {
|
|
|
root /usr/share/nginx/html;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
server {
|
|
|
listen 443 ssl;
|
|
|
server_name web0.fhnw.ch;
|
|
|
client_max_body_size 10M;
|
|
|
keepalive_timeout 30;
|
|
|
error_log /var/log/nginx/web0.fhnw.ch-error-ssl.log debug;
|
|
|
error_page 500 502 503 504 /50x.html;
|
|
|
location = /50x.html {
|
|
|
root /usr/share/nginx/html;
|
|
|
}
|
|
|
|
|
|
|
|
|
ssl on;
|
|
|
ssl_certificate /etc/letsencrypt/live/web0.fhnw.ch/fullchain.pem;
|
... | ... | @@ -35,33 +31,47 @@ server { |
|
|
fastcgi_param HTTPS on;
|
|
|
fastcgi_param HTTP_SCHEME https;
|
|
|
|
|
|
location / {
|
|
|
root /usr/share/nginx/dist;
|
|
|
index index.html index.htm;
|
|
|
location /secure {
|
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
|
proxy_set_header X-Forwarded-Proto https;
|
|
|
proxy_set_header Host $host;
|
|
|
proxy_pass https://localhost:8443/secure;
|
|
|
}
|
|
|
|
|
|
location /Shibboleth.sso {
|
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
|
proxy_set_header X-Forwarded-Proto https;
|
|
|
proxy_set_header Host $host;
|
|
|
proxy_pass https://localhost:8443/Shibboleth.sso;
|
|
|
}
|
|
|
|
|
|
location /hook/ {
|
|
|
proxy_pass http://localhost:5000;
|
|
|
proxy_pass http://localhost:5000;
|
|
|
}
|
|
|
|
|
|
include /etc/nginx/conf.d/locations/*.conf;
|
|
|
|
|
|
error_page 500 502 503 504 /50x.html;
|
|
|
location = /50x.html {
|
|
|
root /usr/share/nginx/html;
|
|
|
location / {
|
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
|
proxy_set_header X-Forwarded-Proto https;
|
|
|
proxy_set_header Host $host;
|
|
|
proxy_pass https://localhost:8443;
|
|
|
}
|
|
|
|
|
|
location /static {
|
|
|
root /webserver/virtualenvs/admintools/admintools;
|
|
|
access_log off;
|
|
|
log_not_found off;
|
|
|
}
|
|
|
|
|
|
location /static/media {
|
|
|
root /webserver/virtualenvs/admintools/admintools;
|
|
|
autoindex on;
|
|
|
index index.html;
|
|
|
access_log off;
|
|
|
log_not_found off;
|
|
|
}
|
|
|
}
|
|
|
```
|
|
|
## Beispiel einer location:
|
|
|
`/etc/nginx/conf.d/locations/test-webdienst.conf`
|
|
|
```
|
|
|
location /test-webdienst {
|
|
|
proxy_redirect off;
|
|
|
proxy_set_header Host $host;
|
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
|
proxy_set_header X-Forwarded-Protocol $scheme;
|
|
|
proxy_pass https://v000155.adm.ds.fhnw.ch/10.0.3.24;
|
|
|
}
|
|
|
|
|
|
```
|
|
|
**proxy_pass** value ist wie folgt aufgebaut: https://[hostname-des-container-servers]/[interne-ip-adresse-des-containers]; |
|
|
\ No newline at end of file |