Add nginx vhost configs for reference
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
This commit is contained in:
32
nginx/k-boris.tech.conf
Normal file
32
nginx/k-boris.tech.conf
Normal file
@@ -0,0 +1,32 @@
|
||||
server {
|
||||
listen 80;
|
||||
listen [::]:80;
|
||||
server_name k-boris.tech www.k-boris.tech;
|
||||
return 301 https://$host$request_uri;
|
||||
}
|
||||
|
||||
server {
|
||||
listen 443 ssl;
|
||||
listen [::]:443 ssl;
|
||||
server_name k-boris.tech www.k-boris.tech;
|
||||
|
||||
ssl_certificate /etc/letsencrypt/live/k-boris.tech/fullchain.pem;
|
||||
ssl_certificate_key /etc/letsencrypt/live/k-boris.tech/privkey.pem;
|
||||
include /etc/letsencrypt/options-ssl-nginx.conf;
|
||||
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
|
||||
|
||||
client_max_body_size 10m;
|
||||
|
||||
# Block admin from main domain — redirect to admin subdomain
|
||||
location /admin/ {
|
||||
return 301 https://admin.k-boris.tech$request_uri;
|
||||
}
|
||||
|
||||
location / {
|
||||
proxy_pass http://127.0.0.1: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 $scheme;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user