mirror of
https://github.com/EtherDream/jsproxy
synced 2024-11-22 09:58:46 +00:00
demo conf
This commit is contained in:
parent
0f3f856506
commit
6b06f808c6
@ -10,11 +10,13 @@ http://127.0.0.1:8080 '127';
|
||||
http://localhost 'lo';
|
||||
http://localhost:8080 'lo';
|
||||
|
||||
https://jsproxy.tk 'js-tk';
|
||||
|
||||
# 接口和网站同源,这种情况下 origin 为空
|
||||
'' 'mysite';
|
||||
|
||||
# ~ 开头为正则匹配,此处允许 github.io 所有子站点
|
||||
~^https://([\w-]+)\.github\.io$ 'gh-$1';
|
||||
~^https://([\w-]+)\.github\.io$ 'gh-$1';
|
||||
|
||||
# 允许任何站点使用
|
||||
# ~(.*) '$1';
|
||||
|
@ -0,0 +1,3 @@
|
||||
listen 8443 ssl http2;
|
||||
ssl_certificate cert/etherdream.com/ecc.cer;
|
||||
ssl_certificate_key cert/etherdream.com/ecc.key;
|
@ -111,9 +111,9 @@ local function nodeSwitched()
|
||||
end
|
||||
|
||||
-- 节点切换功能,目前还在测试中(demo 中已开启)
|
||||
-- if nodeSwitched() then
|
||||
-- return
|
||||
-- end
|
||||
if nodeSwitched() then
|
||||
return
|
||||
end
|
||||
|
||||
|
||||
local h, err = ngx.resp.get_headers()
|
||||
|
24
upload.sh
Executable file
24
upload.sh
Executable file
@ -0,0 +1,24 @@
|
||||
#!/usr/bin/env bash
|
||||
# 功能:同步文件到所有节点,并重启服务
|
||||
|
||||
HOST=etherdream.com
|
||||
NODE=(
|
||||
aliyun-hk-2
|
||||
# aliyun-hk-0
|
||||
# aliyun-hk-1
|
||||
# aliyun-sg
|
||||
)
|
||||
for v in ${NODE[@]}; do
|
||||
echo "$v upload ..."
|
||||
|
||||
rsync . jsproxy@$v.$HOST:server \
|
||||
-a \
|
||||
--exclude='nginx/cache/*' \
|
||||
--exclude='nginx/logs/*'
|
||||
|
||||
echo "$v restart ..."
|
||||
|
||||
ssh jsproxy@$v.$HOST "./server/run.sh reload"
|
||||
done
|
||||
|
||||
echo "done"
|
Loading…
Reference in New Issue
Block a user