I am trying to open a neo4j database on the Internet.
For security reasons, I would like to hide it behind an SSL / basic_auth combination via nginx. Here is the corresponding nginx configuration:
location /neo4j/ { proxy_pass https://localhost:7473/; proxy_read_timeout 600; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X_FORWARDED_PROTO https; proxy_set_header Host $http_host; proxy_buffering off; proxy_redirect off; auth_basic "restricted"; auth_basic_user_file /etc/nginx/auth/htpasswd; proxy_headers_hash_max_size 1024; proxy_headers_hash_bucket_size 128; proxy_ssl_session_reuse off; rewrite /neo4j/(.*) /$1 break; }
While I can access https://example.com/neo4j/browser , the web interface tells me that it cannot connect to neo4j, and my web browser console is populating OPTIONS https://example.com/db/data 405(Not allowed)
I also tried creating neo4j on an https server along with an authentication extension ( https://github.com/neo4j-contrib/authentication-extension ). With this option, I can also access the web interface.
But the interface also shows that it cannot connect to the neo4j console and webbrowser, it populates OPTIONS http://example.com:7473/db/data/ net::ERR_EMPTY_RESPONSE and the tip The page at 'https://example.com:7473/browser/' was loaded over HTTPS, but displayed insecure content from 'http://example.com:7473/db/data/': this content should also be loaded over HTTPS.
Does anyone know how to make it work? Thank you very much in advance!
ssl neo4j proxy reverse-proxy nginx
udo
source share