{"action":"created","issue":{"url":"https://api.github.com/repos/jupyterhub/jupyterhub/issues/1716","repository_url":"https://api.github.com/repos/jupyterhub/jupyterhub","labels_url":"https://api.github.com/repos/jupyterhub/jupyterhub/issues/1716/labels{/name}","comments_url":"https://api.github.com/repos/jupyterhub/jupyterhub/issues/1716/comments","events_url":"https://api.github.com/repos/jupyterhub/jupyterhub/issues/1716/events","html_url":"https://github.com/jupyterhub/jupyterhub/issues/1716","id":304182746,"node_id":"MDU6SXNzdWUzMDQxODI3NDY=","number":1716,"title":"JupyterHub on subpath behind apache2 reverse proxy","user":{"login":"tchakravarty","id":2289192,"node_id":"MDQ6VXNlcjIyODkxOTI=","avatar_url":"https://avatars0.githubusercontent.com/u/2289192?v=4","gravatar_id":"","url":"https://api.github.com/users/tchakravarty","html_url":"https://github.com/tchakravarty","followers_url":"https://api.github.com/users/tchakravarty/followers","following_url":"https://api.github.com/users/tchakravarty/following{/other_user}","gists_url":"https://api.github.com/users/tchakravarty/gists{/gist_id}","starred_url":"https://api.github.com/users/tchakravarty/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tchakravarty/subscriptions","organizations_url":"https://api.github.com/users/tchakravarty/orgs","repos_url":"https://api.github.com/users/tchakravarty/repos","events_url":"https://api.github.com/users/tchakravarty/events{/privacy}","received_events_url":"https://api.github.com/users/tchakravarty/received_events","type":"User","site_admin":false},"labels":[{"id":542035446,"node_id":"MDU6TGFiZWw1NDIwMzU0NDY=","url":"https://api.github.com/repos/jupyterhub/jupyterhub/labels/configuration","name":"configuration","color":"c5def5","default":false},{"id":106589228,"node_id":"MDU6TGFiZWwxMDY1ODkyMjg=","url":"https://api.github.com/repos/jupyterhub/jupyterhub/labels/question","name":"question","color":"Cfaef7","default":true}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":8,"created_at":"2018-03-11T18:47:34Z","updated_at":"2018-11-12T14:12:39Z","closed_at":"2018-05-02T03:54:24Z","author_association":"NONE","body":"The JupyterHub [documentation shows how to reverse proxy JH on the root path][1] (`/`). However, I would like to access JH at `xxx.yyy.com/jupyter`, that is, on the subpath **`jupyter`**.\r\n\r\nHere is the relevant block in my `000-default.conf`. Note that there is no JH config file that is being used, i.e., default configuration. \r\n\r\n    <VirtualHost *:443>\r\n      SSLEngine on\r\n      SSLCertificateFile /path/to/certs/MaimKey.crt\r\n      SSLCertificateKeyFile /path/to/certs/decrypted-private-key.pem\r\n      SSLCertificateChainFile /path/to/certs/Chain.crt\r\n    \r\n      <Proxy *>\r\n        Allow from localhost\r\n      </Proxy>\r\n            <Location />\r\n                    AuthType Basic\r\n                    AuthName \"Restrcted Access - Authenticate\"\r\n                    AuthUserFile /etc/httpd/htpasswd.users\r\n                    Require valid-user\r\n            </Location>\r\n    \r\n      ProxyPassMatch ^/(.+)/websocket ws://localhost:8787/$1/websocket\r\n      ProxyPass / http://localhost:8787/\r\n      ProxyPassReverse / http://localhost:8787/\r\n    \r\n       ServerName xxx.yyy.com\r\n    \r\n      <Location \"/jupyter\">\r\n        # preserve Host header to avoid cross-origin problems\r\n        ProxyPreserveHost on\r\n        # proxy to JupyterHub\r\n        ProxyPass         http://localhost:8000/\r\n        ProxyPassReverse  http://localhost:8000/\r\n      </Location>\r\n    \r\n      # Use RewriteEngine to handle websocket connection upgrades\r\n      RewriteEngine On\r\n      RewriteCond %{HTTP:Connection} Upgrade [NC]\r\n      RewriteCond %{HTTP:Upgrade} websocket [NC]\r\n      RewriteRule /(.*) ws://localhost:8000/$1 [P,L]\r\n    </VirtualHost>\r\n\r\nNow when I go to `xxx.yyy.com/jupyter` it redirects to `xxx.yyy.com/hub` and I get the message: \r\n\r\n> /hub not found\r\n\r\nAny help with this configuration would be appreciated. I am aware of similar questions [here][2], [here][3] and [here][4], but none of them appear to resolve this issue, specifically for apache & JupyterHub. \r\n\r\n\r\n  [1]: http://jupyterhub.readthedocs.io/en/latest/reference/config-examples.html\r\n  [2]: https://github.com/jupyterhub/jupyterhub/issues/219\r\n  [3]: https://stackoverflow.com/q/46706951/1414455\r\n  [4]: https://github.com/jupyter/notebook/issues/3019"},"comment":{"url":"https://api.github.com/repos/jupyterhub/jupyterhub/issues/comments/437895463","html_url":"https://github.com/jupyterhub/jupyterhub/issues/1716#issuecomment-437895463","issue_url":"https://api.github.com/repos/jupyterhub/jupyterhub/issues/1716","id":437895463,"node_id":"MDEyOklzc3VlQ29tbWVudDQzNzg5NTQ2Mw==","user":{"login":"DataVictorEngineer","id":39489854,"node_id":"MDQ6VXNlcjM5NDg5ODU0","avatar_url":"https://avatars0.githubusercontent.com/u/39489854?v=4","gravatar_id":"","url":"https://api.github.com/users/DataVictorEngineer","html_url":"https://github.com/DataVictorEngineer","followers_url":"https://api.github.com/users/DataVictorEngineer/followers","following_url":"https://api.github.com/users/DataVictorEngineer/following{/other_user}","gists_url":"https://api.github.com/users/DataVictorEngineer/gists{/gist_id}","starred_url":"https://api.github.com/users/DataVictorEngineer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DataVictorEngineer/subscriptions","organizations_url":"https://api.github.com/users/DataVictorEngineer/orgs","repos_url":"https://api.github.com/users/DataVictorEngineer/repos","events_url":"https://api.github.com/users/DataVictorEngineer/events{/privacy}","received_events_url":"https://api.github.com/users/DataVictorEngineer/received_events","type":"User","site_admin":false},"created_at":"2018-11-12T14:12:39Z","updated_at":"2018-11-12T14:12:39Z","author_association":"CONTRIBUTOR","body":"@andreas-h and @willingc the modifications are merge to the documentation: https://github.com/jupyterhub/jupyterhub/blob/master/docs/source/reference/config-proxy.md\r\n\r\nThanks for pointing out @andreas-h ! "}}
{"actor":{"display_login":"DataVictorEngineer"}}