I am trying to figure out how to configure the base url of and IPython notebook server running. So instead of the default:
#request# GET http://localhost:8888/static/tree/js/main.min.js?v=04a28c5e21950738efb217191f08ac33
#request# GET http://localhost:8888/api/terminals?_=1441754529652
#request# GET http://localhost:8888/custom/custom.js?v=20150908160654
#request# GET http://localhost:8888/notebooks/Untitled1.ipynb?kernel_name=python3#
I want to configure all requests so that the go through ipython
, as in:
#request# GET http://localhost:8888/ipython/static/tree/js/main.min.js?v=04a28c5e21950738efb217191f08ac33
#request# GET http://localhost:8888/ipython/api/terminals?_=1441754529652
#request# GET http://localhost:8888/ipython/custom/custom.js?v=20150908160654
#request# GET http://localhost:8888/ipython/notebooks/Untitled1.ipynb?kernel_name=python3#
Is this possible?
To change the base url for the files that are being served up from iPython, edit the ipython_notebook_config.py
file in your ~/.ipython/[profile-name]/
directory.
In particular, assuming that your config file starts with the line c = get_config()
, you will want to add the following lines to your configuration:
c.NotebookApp.base_project_url = '/ipython/'
c.NotebookApp.base_kernel_url = '/ipython/'
c.NotebookApp.webapp_settings = {'static_url_prefix':'/ipython/static/'}
This will make it so that your project is served up from http://localhost:8888/ipython/
instead of http://localhost:8888/
.
For more information please see this page of the ipython docs.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With