头条DevOps运维平台,官网:walle
个人基于头条开源walle项目改造学习
nginx配置目录:/etc/nginx/conf.d, 新增配置文件,重启NGINX生效
upstream webservers {
server debian:5000 weight=1; ## 域名
}
server {
listen 81;
server_name debian; ## 域名
access_log /var/log/walle.log;
index index.html index.htm;
location / {
try_files $uri $uri/ /index.html;
add_header access-control-allow-origin *;
root /home/sample/code/new-walle-web/fe; ## walle-web fe目录绝对路径
}
location ^~ /api/ {
add_header access-control-allow-origin *;
proxy_pass http://webservers;
proxy_set_header X-Forwarded-Host $host:$server_port;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Origin $host:$server_port;
proxy_set_header Referer $host:$server_port;
}
location ^~ /socket.io/ {
add_header access-control-allow-origin *;
proxy_pass http://webservers;
proxy_set_header X-Forwarded-Host $host:$server_port;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Origin $host:$server_port;
proxy_set_header Referer $host:$server_port;
proxy_set_header Host $http_host;
proxy_set_header X-NginX-Proxy true;
# WebScoket Support
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
}
bash admin.sh migration
bash admin.sh start
地址:debian:81
用户名/密码:
- 超管:[email protected] \ Walle123
- 所有者:[email protected] \ Walle123
- 负责人:[email protected] \ Walle123
- 开发者:[email protected] \ Walle123
- 访客:[email protected] \ Walle123