update ts domain config
This commit is contained in:
+10
-5
@@ -2,19 +2,17 @@ server {
|
|||||||
# https://serverfault.com/questions/798734/use-variable-for-server-name-in-nginx#
|
# https://serverfault.com/questions/798734/use-variable-for-server-name-in-nginx#
|
||||||
# server_name $servername;
|
# server_name $servername;
|
||||||
server_name "ts.moicen.com";
|
server_name "ts.moicen.com";
|
||||||
# listen 443 ssl;
|
listen 443 ssl;
|
||||||
listen 80;
|
listen 80;
|
||||||
client_max_body_size 10M;
|
client_max_body_size 10M;
|
||||||
|
|
||||||
# disable in local test env
|
# disable in local test env
|
||||||
# ssl_certificate /etc/letsencrypt/live/admin.moicen.com/fullchain.pem; # managed by Certbot
|
ssl_certificate /etc/letsencrypt/live/ts.moicen.com/fullchain.pem; # managed by Certbot
|
||||||
# ssl_certificate_key /etc/letsencrypt/live/admin.moicen.com/privkey.pem; # managed by Certbot
|
ssl_certificate_key /etc/letsencrypt/live/ts.moicen.com/privkey.pem; # managed by Certbot
|
||||||
|
|
||||||
# set $tmp_file_dir "/file_upload/"; # 文件存储路径
|
|
||||||
set $task_server "http://127.0.0.1:8080"; # task server host
|
set $task_server "http://127.0.0.1:8080"; # task server host
|
||||||
set $htyuc "http://127.0.0.1:3000"; #htyuc host
|
set $htyuc "http://127.0.0.1:3000"; #htyuc host
|
||||||
set $resty_loc "/usr/local/openresty";
|
set $resty_loc "/usr/local/openresty";
|
||||||
# set $convert "/usr/bin/convert";
|
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
try_files $uri $uri/ /index.html;
|
try_files $uri $uri/ /index.html;
|
||||||
@@ -32,6 +30,13 @@ server {
|
|||||||
location /api/v1/ts/ {
|
location /api/v1/ts/ {
|
||||||
proxy_pass http://127.0.0.1:8080/api/v1/ts/;
|
proxy_pass http://127.0.0.1:8080/api/v1/ts/;
|
||||||
proxy_set_header Host $host;
|
proxy_set_header Host $host;
|
||||||
|
proxy_set_header X-Forwarded-For $remote_addr;
|
||||||
|
proxy_set_header X-Forwarded-Host $remote_addr;
|
||||||
|
if ($http_origin ~ [a-z]+\.moicen\.com$) {
|
||||||
|
proxy_set_header Access-Control-Allow-Origin $http_origin;
|
||||||
|
proxy_set_header Access-Control-Request-Methods GET,POST,OPTIONS;
|
||||||
|
}
|
||||||
|
proxy_set_header Access-Control-Allow-Headers x-requested-with;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user