80后的细娃儿

# 服务器端管理后台
server {
listen 80;
server_name frp.123.net;

location / {
proxy_pass http://127.0.0.1:6443;
proxy_set_header Host $host:80;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_hide_header X-Powered-By;
}
}

# 代理http web
server {
listen 80;
server_name *.frp.123.net;

location / {
proxy_pass http://127.0.0.1:81;
proxy_set_header Host $host:80;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_hide_header X-Powered-By;
}
}

# 如果启用SSL
server {
listen 443 ssl;
server_name *.frp.123.net;

#SSL-START SSL相关配置,请勿删除或修改下一行带注释的404规则
#error_page 404/404.html;
ssl_certificate /etc/letsencrypt/live/ftp.123.net/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/ftp.123.net/privkey.pem;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:HIGH:!aNULL:!MD5:!RC4:!DHE;
ssl_prefer_server_ciphers on;
ssl_session_cache shared:SSL:10m;
ssl_session_timeout 60m;
error_page 497 https://$host$request_uri;

#SSL-END

location / {
proxy_pass http://127.0.0.1:81;
proxy_set_header Host $host:80;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_hide_header X-Powered-By;
}
}

点赞

发表评论