läuft lokal, kein Internet
This commit is contained in:
12
nginxPages/00-http-redirect.conf
Normal file
12
nginxPages/00-http-redirect.conf
Normal file
@@ -0,0 +1,12 @@
|
||||
server {
|
||||
listen 80 default_server;
|
||||
server_name _;
|
||||
|
||||
location /.well-known/acme-challenge/ {
|
||||
root /var/www/certbot;
|
||||
}
|
||||
|
||||
location / {
|
||||
return 301 https://$host$request_uri;
|
||||
}
|
||||
}
|
||||
39
nginxPages/10-server-schooltech.conf
Normal file
39
nginxPages/10-server-schooltech.conf
Normal file
@@ -0,0 +1,39 @@
|
||||
server {
|
||||
listen 443 ssl http2;
|
||||
server_name server.schooltech.ch;
|
||||
|
||||
ssl_certificate /etc/letsencrypt/live/server.schooltech.ch/fullchain.pem;
|
||||
ssl_certificate_key /etc/letsencrypt/live/server.schooltech.ch/privkey.pem;
|
||||
ssl_protocols TLSv1.2 TLSv1.3;
|
||||
ssl_prefer_server_ciphers on;
|
||||
|
||||
root /usr/share/nginx/html;
|
||||
index index.html;
|
||||
|
||||
# UI / SPA
|
||||
location / {
|
||||
try_files $uri $uri/ /index.html;
|
||||
}
|
||||
|
||||
# API forwarding (auth)
|
||||
location /api/ {
|
||||
proxy_pass http://appserverauth:3000/api/;
|
||||
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-Proto $scheme;
|
||||
}
|
||||
|
||||
# Internal auth endpoint for auth_request
|
||||
location = /nginxauth {
|
||||
internal;
|
||||
proxy_pass http://appserverauth:3000/internal/auth;
|
||||
proxy_set_header Cookie $http_cookie;
|
||||
proxy_set_header X-Original-URI $request_uri;
|
||||
proxy_set_header X-Original-Host $host;
|
||||
proxy_set_header X-Forwarded-Host $host;
|
||||
}
|
||||
|
||||
# Security headers
|
||||
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;
|
||||
}
|
||||
117
nginxPages/50-subdomains-userA.conf
Normal file
117
nginxPages/50-subdomains-userA.conf
Normal file
@@ -0,0 +1,117 @@
|
||||
# Default 443 für unbekannte Subdomains
|
||||
server {
|
||||
listen 443 ssl http2 default_server;
|
||||
server_name _;
|
||||
|
||||
ssl_certificate /etc/letsencrypt/live/server.schooltech.ch/fullchain.pem;
|
||||
ssl_certificate_key /etc/letsencrypt/live/server.schooltech.ch/privkey.pem;
|
||||
ssl_protocols TLSv1.2 TLSv1.3;
|
||||
|
||||
return 444;
|
||||
}
|
||||
|
||||
# ------------------------------------------------------------
|
||||
# portainer.server.schooltech.ch
|
||||
# ------------------------------------------------------------
|
||||
server {
|
||||
listen 443 ssl http2;
|
||||
server_name portainer.server.schooltech.ch;
|
||||
|
||||
ssl_certificate /etc/letsencrypt/live/server.schooltech.ch/fullchain.pem;
|
||||
ssl_certificate_key /etc/letsencrypt/live/server.schooltech.ch/privkey.pem;
|
||||
ssl_protocols TLSv1.2 TLSv1.3;
|
||||
ssl_prefer_server_ciphers on;
|
||||
|
||||
# Auth nur auf UI
|
||||
location / {
|
||||
auth_request /nginxauth;
|
||||
|
||||
proxy_pass http://portainer:9000;
|
||||
proxy_http_version 1.1;
|
||||
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Forwarded-Proto https;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
|
||||
# iFrame-freundlich
|
||||
proxy_hide_header X-Frame-Options;
|
||||
add_header X-Frame-Options "ALLOWALL" always;
|
||||
proxy_hide_header Content-Security-Policy;
|
||||
add_header Content-Security-Policy "frame-ancestors *" always;
|
||||
}
|
||||
|
||||
location = /nginxauth {
|
||||
internal;
|
||||
proxy_pass http://appserverauth:3000/internal/auth;
|
||||
proxy_set_header Cookie $http_cookie;
|
||||
proxy_set_header X-Original-URI $request_uri;
|
||||
proxy_set_header X-Original-Host $host;
|
||||
proxy_set_header X-Forwarded-Host $host;
|
||||
}
|
||||
}
|
||||
|
||||
# ------------------------------------------------------------
|
||||
# abc.server.schooltech.ch
|
||||
# ------------------------------------------------------------
|
||||
server {
|
||||
listen 443 ssl http2;
|
||||
server_name abc.server.schooltech.ch;
|
||||
|
||||
ssl_certificate /etc/letsencrypt/live/server.schooltech.ch/fullchain.pem;
|
||||
ssl_certificate_key /etc/letsencrypt/live/server.schooltech.ch/privkey.pem;
|
||||
|
||||
root /usr/share/nginx/abc;
|
||||
index index.html;
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ /index.html;
|
||||
}
|
||||
}
|
||||
|
||||
# ------------------------------------------------------------
|
||||
# xyz.server.schooltech.ch
|
||||
# ------------------------------------------------------------
|
||||
server {
|
||||
listen 443 ssl http2;
|
||||
server_name xyz.server.schooltech.ch;
|
||||
|
||||
ssl_certificate /etc/letsencrypt/live/server.schooltech.ch/fullchain.pem;
|
||||
ssl_certificate_key /etc/letsencrypt/live/server.schooltech.ch/privkey.pem;
|
||||
|
||||
root /usr/share/nginx/xyz;
|
||||
index index.html;
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ /index.html;
|
||||
}
|
||||
}
|
||||
|
||||
# ------------------------------------------------------------
|
||||
# guacamole.server.schooltech.ch
|
||||
# ------------------------------------------------------------
|
||||
server {
|
||||
listen 443 ssl http2;
|
||||
server_name guacamole.server.schooltech.ch;
|
||||
|
||||
ssl_certificate /etc/letsencrypt/live/server.schooltech.ch/fullchain.pem;
|
||||
ssl_certificate_key /etc/letsencrypt/live/server.schooltech.ch/privkey.pem;
|
||||
|
||||
location / {
|
||||
proxy_pass http://guacamole:8080;
|
||||
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-Proto https;
|
||||
|
||||
# iFrame-freundlich
|
||||
proxy_hide_header X-Frame-Options;
|
||||
add_header X-Frame-Options "ALLOWALL" always;
|
||||
proxy_hide_header Content-Security-Policy;
|
||||
add_header Content-Security-Policy "frame-ancestors *" always;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user