RicterZ / BGmi

BGmi is a cli tool for subscribed bangumi.
https://bgmi.ricterz.me
387 stars 72 forks source link

在linux系统中web页面异常 #105

Closed liuz4i closed 6 years ago

liuz4i commented 6 years ago

我在linux系统上web显示异常,在运行bgmi_http命令后web页面显示如下 default 我尝试了ubunntu17.10 centos7在python3环境下都是同样的情况,而我在win10上使用同样的操作却能够正常运行显示web界面,请问一下这是什么问题?

trim21 commented 6 years ago

你的nginx没有设置好

server {
    listen 80;
    server_name bgmi;

    root /path/to/bgmi;
    autoindex on;
    charset utf-8;

    location /bangumi {
        # ~/.bgmi/bangumi
        alias /path/to/bangumi;
    }

    location /api {
        proxy_pass http://127.0.0.1:8888;
    }

    location /resource {
        proxy_pass http://127.0.0.1:8888;
    }

    location / {
        # ~/.bgmi/front_static/;
        alias /path/to/front_static/;
    }

}

bgmi install

trim21 commented 6 years ago

windows上一般不会有人用nginx,所以是直接用tornado自己代理的前端静态文件...

liuz4i commented 6 years ago

问题已经解决了,之后又遇到了403 Forbidden错误,一路坎坷,最后修改了root文件夹权限,总算成功了

zzzop commented 6 years ago

请问nginx配置文件只改这一行就可以吗,我改了以后404错误,可以指点一下吗 server_name bgmi;

trim21 commented 6 years ago

不行 下面几个/path/to/xxx也要改成对应的路径

trim21 commented 6 years ago

location /bangumi {

~/.bgmi/bangumi

    alias /path/to/bangumi;
}

alias后面是你的save_path

location / {

~/.bgmi/front_static/;

    alias /path/to/front_static/;
}

alias后面时bgmi_path/front_static