{"action":"closed","issue":{"url":"https://api.github.com/repos/ipython/ipython/issues/7898","labels_url":"https://api.github.com/repos/ipython/ipython/issues/7898/labels{/name}","comments_url":"https://api.github.com/repos/ipython/ipython/issues/7898/comments","events_url":"https://api.github.com/repos/ipython/ipython/issues/7898/events","html_url":"https://github.com/ipython/ipython/issues/7898","id":59344084,"number":7898,"title":"IPython Notebook behind apache proxy","user":{"login":"franga2000","id":3891092,"avatar_url":"https://avatars.githubusercontent.com/u/3891092?v=3","gravatar_id":"","url":"https://api.github.com/users/franga2000","html_url":"https://github.com/franga2000","followers_url":"https://api.github.com/users/franga2000/followers","following_url":"https://api.github.com/users/franga2000/following{/other_user}","gists_url":"https://api.github.com/users/franga2000/gists{/gist_id}","starred_url":"https://api.github.com/users/franga2000/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/franga2000/subscriptions","organizations_url":"https://api.github.com/users/franga2000/orgs","repos_url":"https://api.github.com/users/franga2000/repos","events_url":"https://api.github.com/users/franga2000/events{/privacy}","received_events_url":"https://api.github.com/users/franga2000/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-02-28T14:47:36Z","updated_at":"2015-09-13T23:03:22Z","closed_at":"2015-09-13T23:03:22Z","body":"Hi, I'm trying to run iPython Notebook behind an Apache2 proxy and I'm having trouble with WebSockets.\r\n\r\nI'd like to have the notebook accessible from <domain>/python/.\r\n\r\nUsing a few tutorials and the apache wiki, I managed to write this VirtualHosts file:\r\n````python\r\n# Trying to proxy WS requests\r\nProxyPass /python/api/kernels ws://127.0.0.1:8888/python/api/kernels\r\nProxyPassReverse /python/api/kernels ws://127.0.0.1:8888/python/api/kernels\r\n\r\n# Proxy HTTP requests\r\nProxyPass /python http://127.0.0.1:8888/python\r\nProxyPassReverse /python http://127.0.0.1:8888/python\r\nProxyRequests On\r\n\r\n# Spoof headers only if the URL contains \"/python/\" (I have other stuff on this VHost)\r\n<If \"%{QUERY_STRING} =~ /python/\">\r\n   Header set Host \"http://127.0.0.1:8888/python\"\r\n   Header set Origin \"http://127.0.0.1:8888/python\"\r\n\r\n   RequestHeader set Host \"http://127.0.0.1:8888/python\"\r\n   RequestHeader set Origin \"http://127.0.0.1:8888/python\"\r\n</If>\r\n```\r\nHere's my notebook profile config:\r\n```python\r\nc = get_config()\r\n\r\nc.NotebookApp.ip = '127.0.0.1'\r\nc.NotebookApp.open_browser = False\r\nc.NotebookApp.port = 8888\r\n\r\nc.NotebookApp.base_url = '/python/'\r\nc.NotebookApp.tornado_settings = {'static_url_prefix':'/python/static/'}\r\nc.NotebookApp.allow_origin='http://127.0.0.1:8888/python'\r\nc.NotebookApp.notebook_dir = '/home/franga2000/iPython/'\r\n```\r\nI'm getting this error in the NB console (also for /stdin and /iopub:\r\n```\r\nWARNING:tornado.access:400 GET /python/api/kernels/f2d21678-4fef-4cb4-996f-dcee954b54ca/shell (127.0.0.1) 0.44ms referer=None\r\n```\r\nI'm using Apache 2.4.7 on Ubuntu 14.04. Also, the notebook is runing in a virtualenv (doubt its relevant).\r\n\r\nWhat am I doing wrong?"}}