diff --git a/usa.yimian.xyz/nginx/conf.d/cloud.yimian.xyz.conf b/usa.yimian.xyz/nginx/conf.d/cloud.yimian.xyz.conf new file mode 100644 index 0000000..5cd783b --- /dev/null +++ b/usa.yimian.xyz/nginx/conf.d/cloud.yimian.xyz.conf @@ -0,0 +1,26 @@ +server { + listen 80; + #listen [::]:80; + server_name cloud.yimian.xyz; + rewrite ^(.*)$ https://$host$1 permanent; +} + +server { + #listen 80; + listen 443 ssl; + server_name cloud.yimian.xyz; + + #ssl_certificate /mnt/config/ssl/yimian.xyz/yimian.xyz.crt; + #ssl_certificate_key /mnt/config/ssl/yimian.xyz/yimian.xyz.key; + + + proxy_set_header Host $host; + proxy_set_header X-Forwarded-For $remote_addr; + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "Upgrade"; + + location / { + proxy_pass https://frps:8123; + } +} diff --git a/usa.yimian.xyz/nginx/conf.d/home-emqx.yimian.xyz.conf b/usa.yimian.xyz/nginx/conf.d/home-emqx.yimian.xyz.conf new file mode 100644 index 0000000..30671c8 --- /dev/null +++ b/usa.yimian.xyz/nginx/conf.d/home-emqx.yimian.xyz.conf @@ -0,0 +1,26 @@ +server { + listen 80; + #listen [::]:80; + server_name home-emqx.yimian.xyz; + rewrite ^(.*)$ https://$host$1 permanent; +} + +server { + #listen 80; + listen 443 ssl; + server_name home-emqx.yimian.xyz; + + #ssl_certificate /mnt/config/ssl/yimian.xyz/yimian.xyz.crt; + #ssl_certificate_key /mnt/config/ssl/yimian.xyz/yimian.xyz.key; + + + proxy_set_header Host $host; + proxy_set_header X-Forwarded-For $remote_addr; + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "Upgrade"; + + location / { + proxy_pass https://frps:8123; + } +} diff --git a/usa.yimian.xyz/nginx/conf.d/home.yimian.xyz.conf b/usa.yimian.xyz/nginx/conf.d/home.yimian.xyz.conf index b97c9d9..930e982 100644 --- a/usa.yimian.xyz/nginx/conf.d/home.yimian.xyz.conf +++ b/usa.yimian.xyz/nginx/conf.d/home.yimian.xyz.conf @@ -9,17 +9,18 @@ server { #listen 80; listen 443 ssl; server_name home.yimian.xyz; - client_max_body_size 9000M; - ssl_certificate /mnt/config/ssl/yimian.xyz/yimian.xyz.crt; - ssl_certificate_key /mnt/config/ssl/yimian.xyz/yimian.xyz.key; + #ssl_certificate /mnt/config/ssl/yimian.xyz/yimian.xyz.crt; + #ssl_certificate_key /mnt/config/ssl/yimian.xyz/yimian.xyz.key; + + + proxy_set_header Host $host; + proxy_set_header X-Forwarded-For $remote_addr; + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "Upgrade"; location / { - proxy_pass http://frps:8123; - proxy_http_version 1.1; - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection 'upgrade'; - proxy_set_header Host $host; - proxy_cache_bypass $http_upgrade; + proxy_pass https://frps:8123; } } diff --git a/usa.yimian.xyz/nginx/conf.d/home.yimian.xyz.conf.bck b/usa.yimian.xyz/nginx/conf.d/home.yimian.xyz.conf.bck new file mode 100644 index 0000000..b97c9d9 --- /dev/null +++ b/usa.yimian.xyz/nginx/conf.d/home.yimian.xyz.conf.bck @@ -0,0 +1,25 @@ +server { + listen 80; + #listen [::]:80; + server_name home.yimian.xyz; + rewrite ^(.*)$ https://$host$1 permanent; +} + +server { + #listen 80; + listen 443 ssl; + server_name home.yimian.xyz; + client_max_body_size 9000M; + + ssl_certificate /mnt/config/ssl/yimian.xyz/yimian.xyz.crt; + ssl_certificate_key /mnt/config/ssl/yimian.xyz/yimian.xyz.key; + + location / { + proxy_pass http://frps:8123; + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection 'upgrade'; + proxy_set_header Host $host; + proxy_cache_bypass $http_upgrade; + } +}