代码拉取完成,页面将自动刷新
# 首页: uni前端, /mds: markdown文档
server {
listen 80;
charset utf-8;
server_name 127.0.0.1;
server_name 47.97.159.133;
# rewrite ^/(.*) http://www.baidu.com/ permanent; # 重定向
# uni-app's client
location / {
root /etc/nginx/sites-available; # 注意此处root和后面alias的区别
index index.html index.htm;
}
# markdown documents
location /mds {
alias /etc/nginx/sites-available/mds/test_md_page.github.io;
index index.html index.htm;
# proxy_pass http://localhost:7080; # 代理本地端口
}
# websocket http://www.bodexiong.vip/ws/chat
location /chat {
proxy_pass http://localhost:8001;
proxy_set_header Host $host;
}
location ~ /ws/chat {
proxy_pass http://localhost:8001;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Host $server_name;
}
}
# uni后端
server {
charset utf-8;
listen 3389;
server_name 47.97.159.133; # 改成你的 IP
location /static {
alias /home/sites/uniapps/hello_uni/static;
}
location /media {
alias /home/sites/uniapps/hello_uni/media;
}
location / {
proxy_set_header Host $host;
proxy_pass http://127.0.0.1:8000;
}
}
# my blog
server {
# listen 80;
listen 443;
charset utf-8;
server_name 127.0.0.1;
server_name 47.97.159.133;
location /static {
alias /home/sites/bodexiong.vip/django_blog_tutorial/collected_static;
}
location /media {
alias /home/sites/bodexiong.vip/django_blog_tutorial/media;
}
location / {
proxy_set_header Host $host;
proxy_pass http://127.0.0.1:8080;
}
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。