add task_server config
This commit is contained in:
+4
-4
@@ -53,10 +53,10 @@ server {
|
|||||||
proxy_pass http://127.0.0.1:3000/api/v1/uc/;
|
proxy_pass http://127.0.0.1:3000/api/v1/uc/;
|
||||||
proxy_set_header Host $host;
|
proxy_set_header Host $host;
|
||||||
}
|
}
|
||||||
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;
|
||||||
}
|
# }
|
||||||
}
|
}
|
||||||
|
|
||||||
server {
|
server {
|
||||||
|
|||||||
@@ -0,0 +1,44 @@
|
|||||||
|
server {
|
||||||
|
# https://serverfault.com/questions/798734/use-variable-for-server-name-in-nginx#
|
||||||
|
# server_name $servername;
|
||||||
|
server_name "ts.moicen.com";
|
||||||
|
# listen 443 ssl;
|
||||||
|
listen 80;
|
||||||
|
client_max_body_size 10M;
|
||||||
|
|
||||||
|
# disable in local test env
|
||||||
|
# ssl_certificate /etc/letsencrypt/live/admin.moicen.com/fullchain.pem; # managed by Certbot
|
||||||
|
# ssl_certificate_key /etc/letsencrypt/live/admin.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 $htyuc "http://127.0.0.1:3000"; #htyuc host
|
||||||
|
set $resty_loc "/usr/local/openresty";
|
||||||
|
# set $convert "/usr/bin/convert";
|
||||||
|
|
||||||
|
location / {
|
||||||
|
try_files $uri $uri/ /index.html;
|
||||||
|
proxy_set_header Host "ts.moicen.com";
|
||||||
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
|
# disable in local test env
|
||||||
|
# proxy_set_header X-Forwarded-Proto https;
|
||||||
|
proxy_set_header X-Forwarded-For $remote_addr;
|
||||||
|
proxy_set_header X-Forwarded-Host $remote_addr;
|
||||||
|
}
|
||||||
|
|
||||||
|
# root $resty_loc/nginx/html/admin;
|
||||||
|
# index index.html;
|
||||||
|
|
||||||
|
location /api/v1/ts/ {
|
||||||
|
proxy_pass http://127.0.0.1:8080/api/v1/ts/;
|
||||||
|
proxy_set_header Host $host;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
# server {
|
||||||
|
# listen 80;
|
||||||
|
# server_name "ts.moicen.com";
|
||||||
|
# location / {
|
||||||
|
# return 301 https://$host$request_uri;
|
||||||
|
# }
|
||||||
|
# }
|
||||||
Reference in New Issue
Block a user