{"action":"created","issue":{"url":"https://api.github.com/repos/binux/pyspider/issues/354","labels_url":"https://api.github.com/repos/binux/pyspider/issues/354/labels{/name}","comments_url":"https://api.github.com/repos/binux/pyspider/issues/354/comments","events_url":"https://api.github.com/repos/binux/pyspider/issues/354/events","html_url":"https://github.com/binux/pyspider/issues/354","id":120796701,"number":354,"title":"Deploy webui with nginx to subdiretory like \"example.com/pyspider\"","user":{"login":"shunia","id":779430,"avatar_url":"https://avatars.githubusercontent.com/u/779430?v=3","gravatar_id":"","url":"https://api.github.com/users/shunia","html_url":"https://github.com/shunia","followers_url":"https://api.github.com/users/shunia/followers","following_url":"https://api.github.com/users/shunia/following{/other_user}","gists_url":"https://api.github.com/users/shunia/gists{/gist_id}","starred_url":"https://api.github.com/users/shunia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shunia/subscriptions","organizations_url":"https://api.github.com/users/shunia/orgs","repos_url":"https://api.github.com/users/shunia/repos","events_url":"https://api.github.com/users/shunia/events{/privacy}","received_events_url":"https://api.github.com/users/shunia/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-12-07T15:21:07Z","updated_at":"2015-12-08T01:54:36Z","closed_at":null,"body":"Can't make this happen due to the flask template engine which produces static assets and referred to resources like:```src=\"/static/index.js\"```,with the context of ```example.com/pyspider```,all resources are loaded from ```exapmle.com/static/index.js``` instead of ```example.com/pyspider/static/index.js```,which of course results a 404 response.\r\nAnyway to handle this-to make pyspider to be running under nginx in a subdirectory style reverse proxy by nginx?\r\n\r\n无法用Nginx配置pyspider webui到```example.com/pyspider```这种子目录的URL形式,因为返回的页面里生成的静态资源引用方式都是诸如:```src=\"/static/index.js\"```,从而导致加载的素材资源实际地址是```example.com/static/index.js```而不是本来应该的```example.com/pyspider/static/index.js```,从而导致css文件和js文件加载404.\r\n请问是否有什么办法来配置nginx或是修改pyspider的启动配置从而支持子目录形式的nginx代理设置?"},"comment":{"url":"https://api.github.com/repos/binux/pyspider/issues/comments/162734046","html_url":"https://github.com/binux/pyspider/issues/354#issuecomment-162734046","issue_url":"https://api.github.com/repos/binux/pyspider/issues/354","id":162734046,"user":{"login":"shunia","id":779430,"avatar_url":"https://avatars.githubusercontent.com/u/779430?v=3","gravatar_id":"","url":"https://api.github.com/users/shunia","html_url":"https://github.com/shunia","followers_url":"https://api.github.com/users/shunia/followers","following_url":"https://api.github.com/users/shunia/following{/other_user}","gists_url":"https://api.github.com/users/shunia/gists{/gist_id}","starred_url":"https://api.github.com/users/shunia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shunia/subscriptions","organizations_url":"https://api.github.com/users/shunia/orgs","repos_url":"https://api.github.com/users/shunia/repos","events_url":"https://api.github.com/users/shunia/events{/privacy}","received_events_url":"https://api.github.com/users/shunia/received_events","type":"User","site_admin":false},"created_at":"2015-12-08T01:54:36Z","updated_at":"2015-12-08T01:54:36Z","body":"@binux Thanks for your reply,I'm switching to the sub-domain way.\r\n谢谢回答.已转用子域的方式."}}