undefinedfix
Sign in

Jupyter notebook can't log in when using nginx proxy remote access. How to set it?

dnqlo edited in Fri, 09 Sep 2022

Problem description

Jupyter notebook cannot log in when using nginx proxy remote access

Problem source: when using nginx proxy domain name to remotely access jupyter notebook, the site can access it, but when entering the password, it cannot jump to tree.

The background of the problem and what methods have you tried

Through the chrome debugging environment, when you enter the password and submit it, you first visit the domain name / tree (302), and then automatically jump to the original login page

图片描述

Related codes

//Please paste the code text below (do not use pictures instead of codes)

From a preliminary judgment, I expect that because jupyter notebook originally had an HTTPS login, the website could not save the session after using the proxy, and the session was lost when the proxy site submitted the login return link.

What are your expectations? What is the actual error message?

My expectation is to use domain name to access jupyter notebook

1 Replies
SpenserWilson1
commented on Fri, 09 Sep 2022

Look at the error output in the background.

If it is blocking cross origin API request for / API / xxx

That's because jupyter thinks the request is cross domain.

Modify jupyter configuration, C NotebookApp.allow \_ origin = '*'

Reference: Jupiter error blocking cross origin API request for / API / xxx solution