A
A
ApiMaster2020-06-23 19:46:19
Nginx
ApiMaster, 2020-06-23 19:46:19

NGINX as reverse proxy with SSL. SSL_ERROR_RX_RECORD_TOO_LONG + Relative URLs not working?

Hi all! I have a Vue + Webpack Dev-server frontend and a Node.js +Express backend running on ports 8080 and 3000 respectively. In order to add SSL support, I use NGINX + Cerbot as a reverse proxy with the following configuration - https://gist.github.com/sergey-prosvirnin/0fb8c37a...

My problem is that when I want to access the backend , for example, to reset a password using a link like liga.is:3000/static/user/auth/local/reset-password... I get a browser error SSL_ERROR_RX_RECORD_TOO_LONG (Firefox), but if I reset cookies and cache, after a reboot everything works again , but the problem repeats again and again.

I also noticed that all images with the /static/img/*** relative path stop working when served through NGINX.

All of the above problems are gone when I'm not using NGINX.

PS I did not add data to the backend config, and in theory the http link should work. Why is there a redirect to https for port 3000?
PPS How to correctly add proxying for the backend (port 3000) in this config?

Website with problem - https://vk.cc/awbpv5

Video with problem #1 - https://youtu.be/l7Zb2Ux3Zw8
Video with problem #2 - https://youtu.be/WS6EAwWV35o

Repository with project code - https: //github.com/HabitRPG/habitica

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question