diff --git a/Server/conf/nginx.conf b/Server/conf/nginx.conf index 9bbdca7..8b82ea7 100644 --- a/Server/conf/nginx.conf +++ b/Server/conf/nginx.conf @@ -66,6 +66,10 @@ http { server 127.0.0.1:8087; } + upstream frp_jellyfin { + server 127.0.0.1:8096; + } + init_by_lua_file lua/settings.lua; server { @@ -202,6 +206,34 @@ http { } } + server { + listen 443 ssl; + server_name jellyfin.amass.fun; + + client_header_timeout 120s; + client_body_timeout 120s; + client_max_body_size 512m; + + ssl_certificate cert/jellyfin.amass.fun.pem; + ssl_certificate_key cert/jellyfin.amass.fun.key; + ssl_session_timeout 5m; #缓存有效期 + ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4; #加密算法 + ssl_protocols TLSv1 TLSv1.1 TLSv1.2; #安全链接可选的加密协议 + ssl_prefer_server_ciphers on; #使用服务器端的首选算法 + + location / { + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "upgrade"; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header x-wiz-real-ip $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header Host $http_host; + proxy_set_header X-Forwarded-Proto $scheme; + proxy_pass http://frp_jellyfin; + } + } + server { listen 443 ssl; server_name gitea.amass.fun; diff --git a/resource/deploy.sh b/resource/deploy.sh index a7401e0..36900c2 100755 --- a/resource/deploy.sh +++ b/resource/deploy.sh @@ -33,7 +33,7 @@ function build() { build/UnitTest/UnitTest } -function deploy_backend() { +function deploy() { build if [ $? -ne 0 ]; then echo "build backend failed ..." @@ -46,10 +46,6 @@ function deploy_backend() { nohup ./HttpServer >logs/HttpServer.log 2>&1 &" } -function deploy() { - deploy_backend -} - function main() { local cmd=$1 shift 1