title: Jupyter Notebook 404 After Login
body: <p>So I'm trying to setup a notebook instance on my server. 
  Ubuntu 16.04
  jupyter notebook is being run from an account set up to only do that. 
  Apache 2 is using ProxyPass to pass all requests to the appropriate port.</p>
  
  <p>apache2.conf:</p>
  
  <pre><code>    ProxyPass /jupyter http://localhost:31415/jupyter
      ProxyPass /jupyter/api/kernels/http://localhost:31415/jupyter/api/kernels/ 
  </code></pre>
  
  <p>Although that second line, though recommend on some sites, seems to be of no consequence whether or not I comment it out.</p>
  
  <p>About the jupyter config: </p>
  
  <pre><code>    c.NotebookApp.base_url = '/jupyter'
      c.NotebookApp.enable_mathjax = True  
      c.NotebookApp.open_browser = False
      c.NotebookApp.password_required = True
      c.NotebookApp.port = 31415 
  </code></pre>
  
  <p>The password has been hashed and is in the .json file.</p>
  
  <p>This log shows me going to <a href="https://mydomain/jupyter" rel="nofollow noreferrer">https://mydomain/jupyter</a>, trying one incorrect password, then trying the correct password:</p>
  
  <pre><code>    [I 00:33:06.290 NotebookApp] Serving notebooks from local directory: /home/jupyter/.jupyter
      [I 00:33:06.290 NotebookApp] 0 active kernels
      [I 00:33:06.290 NotebookApp] The Jupyter Notebook is running at:
      [I 00:33:06.290 NotebookApp] http://localhost:31415/jupyter/
      [I 00:33:06.290 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
      [I 00:33:51.782 NotebookApp] 302 GET /jupyter/ (127.0.0.1) 1.10ms
      [I 00:33:51.940 NotebookApp] 302 GET /jupyter/tree? (127.0.0.1) 1.48ms
      [W 00:34:03.481 NotebookApp] 401 POST /jupyter/login?next=%2Fjupyter%2Ftree%3F (127.0.0.1) 2.68ms referer=http://mydomain/jupyter/login?next=%2Fjupyter%2Ftree%3F
      [I 00:34:10.460 NotebookApp] 302 POST /jupyter/login?next=%2Fjupyter%2Ftree%3F (127.0.0.1) 1.82ms
      [I 00:34:10.621 NotebookApp] Refusing to serve hidden directory, via 404 Error
      [W 00:34:10.634 NotebookApp] 404 GET /jupyter/tree? (127.0.0.1) 14.33ms referer=http://mydomain/jupyter/login?next=%2Fjupyter%2Ftree%3F
  </code></pre>
  
  <p>You can see that main 404 error there. In my browser, the result was:
  <a href="https://i.stack.imgur.com/MJ98A.png" rel="nofollow noreferrer">404</a></p>
  
  <p>But I was able to make it through the login prompt. </p>