Add reverse proxy SSL guides for Caddy, Nginx, and Traefik.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
# Замените panel.example.com на свой DOMAIN.
|
||||
# После выпуска сертификата Certbot раскомментируйте блок HTTPS ниже.
|
||||
|
||||
upstream vpn_panel {
|
||||
server app:8080;
|
||||
keepalive 32;
|
||||
}
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
listen [::]:80;
|
||||
server_name panel.example.com;
|
||||
|
||||
location /.well-known/acme-challenge/ {
|
||||
root /var/www/certbot;
|
||||
}
|
||||
|
||||
# Пока сертификата нет — проксируем HTTP.
|
||||
# После выпуска SSL лучше редиректить на HTTPS (раскомментируйте return и закомментируйте location /).
|
||||
# return 301 https://$host$request_uri;
|
||||
|
||||
location / {
|
||||
proxy_pass http://vpn_panel;
|
||||
include /etc/nginx/snippets/proxy_params.conf;
|
||||
}
|
||||
}
|
||||
|
||||
# --- HTTPS (раскомментировать после certbot certonly) ---
|
||||
# server {
|
||||
# listen 443 ssl http2;
|
||||
# listen [::]:443 ssl http2;
|
||||
# server_name panel.example.com;
|
||||
#
|
||||
# ssl_certificate /etc/letsencrypt/live/panel.example.com/fullchain.pem;
|
||||
# ssl_certificate_key /etc/letsencrypt/live/panel.example.com/privkey.pem;
|
||||
# include /etc/nginx/snippets/ssl_params.conf;
|
||||
#
|
||||
# location / {
|
||||
# proxy_pass http://vpn_panel;
|
||||
# include /etc/nginx/snippets/proxy_params.conf;
|
||||
# }
|
||||
# }
|
||||
Reference in New Issue
Block a user