-
Notifications
You must be signed in to change notification settings - Fork 136
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
After setup ssl for lighttpd, frontend can't connect to backend #120
Comments
For ssl support, I think easiest to proxy requests through nginx. I haven't done much with native support of ssl in the openmonero backend. If your backend and lighttpd are running on localhost and you access the frontend on the same localhost, then should be e.g., For instance on my vps, I run openmonero (http://139.162.60.17:81) with config of http://139.162.60.17:81/js/config.js?4 |
Ok, for ssl support, openmonero will work on nginx server? |
Yes it will run. Front end are just static files, html, js and css. So you can host it from whatever you want. In readme there are minimal instructions for using nginx in docker for that: https://github.com/moneroexamples/openmonero/tree/devel#nginx-using-docker But for real life use on mainnet over internet (i.e. not on your localhost, or testnet/stagenet networks) a connection of the frontend to backend needs to be though ssl. For that I don't have any guides. You would have to google how to proxy ssl over nginx. For example: https://docs.nginx.com/nginx/admin-guide/security-controls/securing-http-traffic-upstream/ |
Should I enable ssl for backend config.js? Line 60 in 1be824a
|
Not sure if this will work. I would consider this a legacy code. Its something that was added long time ago, not really tested and probably will be removed, as using nginx seems as a superior solution. You have to remember openmoenro is still very much in development, so not everything is fully done, and native ssl support, is one of these things. |
After I setup ssl for nginx, still it's not working. |
What is the purpose of backend ssl setting?
Btw, frontend and backend is running on same VPS, In this case, |
Ok, finally I was able to make it run with SSL. |
P/s: backend config for ssl works well, you don't need to remove it |
Good to hear that. Regarding CORS. At present the backbend is using this: openmonero/src/YourMoneroRequests.cpp Lines 1784 to 1788 in 1be824a
If you have any recommendations or ideas how to change that, to make it CORS friendly, I would be grateful. Taking care of CORS is one of those things that are on my "to do list", but there has not been time yet to actually look into it, as always something else is poping up that requires attention. p.s. |
I was using devel branch. |
Could you provide the error message Firefox is throwing about CORS? |
Oh my gosh, it's working on firefox magically. |
Oh ok. Maybe there was something in firefox cash, making it go crazy. Anyway, glad to hear its working. If something else is going to happen, please let me know. |
Everything was fine before add SSL for lighttd, but after I add SSL, it's saying
Error: Can't connect to the backend! Maybe it is down.
on the Ubuntu Server.And the other question is why apiURL should serverip:1984 in the html/js/config.js file?
When I use 127.0.0.1 instead of serverip, I also couldn't see front end is working with backend.
The text was updated successfully, but these errors were encountered: