{"action":"created","issue":{"url":"https://api.github.com/repos/ether/etherpad-lite/issues/2331","labels_url":"https://api.github.com/repos/ether/etherpad-lite/issues/2331/labels{/name}","comments_url":"https://api.github.com/repos/ether/etherpad-lite/issues/2331/comments","events_url":"https://api.github.com/repos/ether/etherpad-lite/issues/2331/events","html_url":"https://github.com/ether/etherpad-lite/issues/2331","id":49619618,"number":2331,"title":"nginx with Etherpad in a subdirectory - wrong loading path","user":{"login":"iceTwy","id":1757585,"avatar_url":"https://avatars.githubusercontent.com/u/1757585?v=3","gravatar_id":"","url":"https://api.github.com/users/iceTwy","html_url":"https://github.com/iceTwy","followers_url":"https://api.github.com/users/iceTwy/followers","following_url":"https://api.github.com/users/iceTwy/following{/other_user}","gists_url":"https://api.github.com/users/iceTwy/gists{/gist_id}","starred_url":"https://api.github.com/users/iceTwy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iceTwy/subscriptions","organizations_url":"https://api.github.com/users/iceTwy/orgs","repos_url":"https://api.github.com/users/iceTwy/repos","events_url":"https://api.github.com/users/iceTwy/events{/privacy}","received_events_url":"https://api.github.com/users/iceTwy/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ether/etherpad-lite/labels/Minor%20Bug","name":"Minor Bug","color":"dddddd"},{"url":"https://api.github.com/repos/ether/etherpad-lite/labels/Needs%20confirmation","name":"Needs confirmation","color":"eb6420"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":16,"created_at":"2014-11-20T21:21:13Z","updated_at":"2015-02-04T16:10:38Z","closed_at":"2015-01-24T22:30:18Z","body":"nginx seems to be looking for files (e.g. socket.io) in the wrong path when Etherpad is in a subdirectory, such as domain.com/etherpad. This causes Etherpad to hang at \"Loading\", whereas accessing it directly from server_ip:9001 works just fine.\r\nI'm using the [nginx => from subdirectory URL](https://github.com/ether/etherpad-lite/wiki/How-to-put-Etherpad-Lite-behind-a-reverse-Proxy) config.\r\n\r\nAn example:\r\n\r\n```\r\n2014/11/20 22:17:34 [error] 9547#0: *1 \"/usr/nginx/share/html/socket.io/index.html\" is not found (2: No such file or directory), client: xx.xx.xx.xx, server: domain.com, request: \"GET /socket.io/?EIO=3&transport=polling&t=1416518254597-73 HTTP/1.1\", host: \"domain.com\", referrer: \"https://domain.com/etherpad/p/aze\"\r\n2014/11/20 22:17:40 [error] 9547#0: *6 \"/usr/nginx/share/html/socket.io/index.html\" is not found (2: No such file or directory), client: xx.xx.xx.xx, server: domain.com, request: \"GET /socket.io/?EIO=3&transport=polling&t=1416518260598-74 HTTP/1.1\", host: \"domain.com\", referrer: \"https://domain.com/etherpad/p/aze\"\r\n```\r\n\r\nThis is the nginx configuration file:\r\n\r\n```\r\nserver {\r\n        listen 80;\r\n        server_name https_redirect;\r\n\r\n        return 301 https://$host$request_uri;\r\n}\r\n\r\nserver {\r\n        listen 443;\r\n        server_name domain.com;\r\n\r\n        root /usr/nginx/share/html;\r\n        index index.html index.htm;\r\n\r\n        location /etherpad {\r\n            rewrite                /etherpad/(.*) /$1 break;\r\n            rewrite                ^/etherpad$ /etherpad/ permanent;\r\n            proxy_pass             http://127.0.0.1:9001;\r\n            proxy_redirect         / /etherpad/;\r\n            proxy_set_header       Host $host;\r\n            proxy_buffering off;\r\n            \r\n            access_log /var/log/nginx/etherpad-access.log combined;\r\n            error_log /var/log/nginx/etherpad-error.log error;\r\n        }\r\n\r\n        (SSL config)\r\n}\r\n```\r\n(N.B.: I've also tried using /pad as the subdirectory, as indicated in the initial config - it doesn't work either.)\r\n\r\nnginx will basically be looking to load socket.io from the root of the server (here, /usr/nginx/share/html).\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/ether/etherpad-lite/issues/comments/72882923","html_url":"https://github.com/ether/etherpad-lite/issues/2331#issuecomment-72882923","issue_url":"https://api.github.com/repos/ether/etherpad-lite/issues/2331","id":72882923,"user":{"login":"JohnMcLear","id":220864,"avatar_url":"https://avatars.githubusercontent.com/u/220864?v=3","gravatar_id":"","url":"https://api.github.com/users/JohnMcLear","html_url":"https://github.com/JohnMcLear","followers_url":"https://api.github.com/users/JohnMcLear/followers","following_url":"https://api.github.com/users/JohnMcLear/following{/other_user}","gists_url":"https://api.github.com/users/JohnMcLear/gists{/gist_id}","starred_url":"https://api.github.com/users/JohnMcLear/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JohnMcLear/subscriptions","organizations_url":"https://api.github.com/users/JohnMcLear/orgs","repos_url":"https://api.github.com/users/JohnMcLear/repos","events_url":"https://api.github.com/users/JohnMcLear/events{/privacy}","received_events_url":"https://api.github.com/users/JohnMcLear/received_events","type":"User","site_admin":false},"created_at":"2015-02-04T16:10:38Z","updated_at":"2015-02-04T16:10:38Z","body":"@mkmelin I'd welcome that as a pull request :)  Bare in mind plugins would also need to support it though..  "}}