166 lines
5.4 KiB
Plaintext
166 lines
5.4 KiB
Plaintext
# Phase 3 candidate for /etc/nginx/sites-available/learn-services.
|
|
# Host Nginx terminates TLS. Traefik receives HTTP only on loopback NodePort.
|
|
|
|
map $http_upgrade $hyeonworks_connection_upgrade {
|
|
default upgrade;
|
|
'' close;
|
|
}
|
|
|
|
server {
|
|
listen 443 ssl default_server;
|
|
listen [::]:443 ssl default_server ipv6only=on;
|
|
ssl_reject_handshake on;
|
|
}
|
|
|
|
server {
|
|
server_name git.learn.hyeonworks.com;
|
|
|
|
location / {
|
|
proxy_pass http://127.0.0.1:30080;
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Host git.learn.hyeonworks.com;
|
|
proxy_set_header X-Forwarded-Host git.learn.hyeonworks.com;
|
|
proxy_set_header X-Forwarded-Proto https;
|
|
proxy_set_header X-Forwarded-Port 443;
|
|
proxy_set_header X-Forwarded-For $remote_addr;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection $hyeonworks_connection_upgrade;
|
|
proxy_request_buffering off;
|
|
proxy_buffering off;
|
|
proxy_read_timeout 3600s;
|
|
proxy_send_timeout 3600s;
|
|
proxy_redirect off;
|
|
client_max_body_size 512m;
|
|
}
|
|
|
|
listen 443 ssl;
|
|
listen [::]:443 ssl;
|
|
ssl_certificate /etc/letsencrypt/live/git.learn.hyeonworks.com/fullchain.pem;
|
|
ssl_certificate_key /etc/letsencrypt/live/git.learn.hyeonworks.com/privkey.pem;
|
|
include /etc/letsencrypt/options-ssl-nginx.conf;
|
|
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
|
|
}
|
|
|
|
server {
|
|
server_name id.learn.hyeonworks.com;
|
|
|
|
location / {
|
|
proxy_pass http://127.0.0.1:30080;
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Host id.learn.hyeonworks.com;
|
|
proxy_set_header X-Forwarded-Host id.learn.hyeonworks.com;
|
|
proxy_set_header X-Forwarded-Proto https;
|
|
proxy_set_header X-Forwarded-Port 443;
|
|
proxy_set_header X-Forwarded-For $remote_addr;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_request_buffering off;
|
|
proxy_buffering off;
|
|
proxy_read_timeout 300s;
|
|
proxy_send_timeout 300s;
|
|
proxy_redirect off;
|
|
client_max_body_size 10m;
|
|
}
|
|
|
|
listen 443 ssl;
|
|
listen [::]:443 ssl;
|
|
ssl_certificate /etc/letsencrypt/live/git.learn.hyeonworks.com/fullchain.pem;
|
|
ssl_certificate_key /etc/letsencrypt/live/git.learn.hyeonworks.com/privkey.pem;
|
|
include /etc/letsencrypt/options-ssl-nginx.conf;
|
|
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
|
|
}
|
|
|
|
server {
|
|
server_name storage-admin.learn.hyeonworks.com;
|
|
|
|
location / {
|
|
allow 192.168.0.0/24;
|
|
allow 100.64.0.0/10;
|
|
deny all;
|
|
|
|
proxy_pass http://127.0.0.1:30080;
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Host storage-admin.learn.hyeonworks.com;
|
|
proxy_set_header X-Forwarded-Host storage-admin.learn.hyeonworks.com;
|
|
proxy_set_header X-Forwarded-Proto https;
|
|
proxy_set_header X-Forwarded-Port 443;
|
|
proxy_set_header X-Forwarded-For $remote_addr;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection $hyeonworks_connection_upgrade;
|
|
proxy_request_buffering off;
|
|
proxy_buffering off;
|
|
proxy_read_timeout 3600s;
|
|
proxy_send_timeout 3600s;
|
|
proxy_redirect off;
|
|
client_max_body_size 5g;
|
|
}
|
|
|
|
listen 443 ssl;
|
|
listen [::]:443 ssl;
|
|
ssl_certificate /etc/letsencrypt/live/storage-admin.learn.hyeonworks.com/fullchain.pem;
|
|
ssl_certificate_key /etc/letsencrypt/live/storage-admin.learn.hyeonworks.com/privkey.pem;
|
|
include /etc/letsencrypt/options-ssl-nginx.conf;
|
|
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
|
|
}
|
|
|
|
server {
|
|
server_name db-admin.learn.hyeonworks.com;
|
|
|
|
location / {
|
|
allow 192.168.0.0/24;
|
|
allow 100.64.0.0/10;
|
|
deny all;
|
|
|
|
proxy_pass http://127.0.0.1:30080;
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Host db-admin.learn.hyeonworks.com;
|
|
proxy_set_header X-Forwarded-Host db-admin.learn.hyeonworks.com;
|
|
proxy_set_header X-Forwarded-Proto https;
|
|
proxy_set_header X-Forwarded-Port 443;
|
|
proxy_set_header X-Forwarded-For $remote_addr;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_request_buffering off;
|
|
proxy_buffering off;
|
|
proxy_read_timeout 600s;
|
|
proxy_send_timeout 600s;
|
|
proxy_redirect off;
|
|
client_max_body_size 100m;
|
|
}
|
|
|
|
listen 443 ssl;
|
|
listen [::]:443 ssl;
|
|
ssl_certificate /etc/letsencrypt/live/storage-admin.learn.hyeonworks.com/fullchain.pem;
|
|
ssl_certificate_key /etc/letsencrypt/live/storage-admin.learn.hyeonworks.com/privkey.pem;
|
|
include /etc/letsencrypt/options-ssl-nginx.conf;
|
|
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
|
|
}
|
|
|
|
server {
|
|
listen 80;
|
|
listen [::]:80;
|
|
server_name git.learn.hyeonworks.com;
|
|
return 301 https://git.learn.hyeonworks.com$request_uri;
|
|
}
|
|
|
|
server {
|
|
listen 80;
|
|
listen [::]:80;
|
|
server_name id.learn.hyeonworks.com;
|
|
return 301 https://id.learn.hyeonworks.com$request_uri;
|
|
}
|
|
|
|
server {
|
|
listen 80;
|
|
listen [::]:80;
|
|
server_name storage-admin.learn.hyeonworks.com;
|
|
return 301 https://storage-admin.learn.hyeonworks.com$request_uri;
|
|
}
|
|
|
|
server {
|
|
listen 80;
|
|
listen [::]:80;
|
|
server_name db-admin.learn.hyeonworks.com;
|
|
return 301 https://db-admin.learn.hyeonworks.com$request_uri;
|
|
}
|