Nginx is configured and running properly. All the nodejs apps are also running properly. But when Ajax requests are sent from a different domain (also https), in console, it says
Failed to load resource: net::ERR_CONNECTION_CLOSED domain.com:port
Failed to load resource: net::ERR_CONNECTION_CLOSED https://domain.com:port
Please guide me to what is causing the issue and how to fix it. Firewall (ufw) is configured properly. All the apps used to run properly before https was installed.
Please review the questions you are asked specifically the one about domain names
Please fill out the fields below so we can help you better.
Note: you must provide your domain name to get help.
Domain names for issued certificates are all made public in Certificate Transparency logs (e.g. https://crt.sh/?q=example.com), so withholding your domain name here does not increase secrecy, but only makes it harder for us to provide help.
Well, before SSL is installed, all those nodejs apps were working. If you try w3rpractice.com:9118/home/user1/apps/app1.js, it may not work because, the way it works is, when a request is sent, the app which resides in /home/user1/apps/app1.js file receives the request and then spits the output./home/user1/apps/app1.js and other paths I mentioned are not meant to be web routes. They are used to accept requests, process and then spit output on a different port. And this was working since last several years without any issue (except a few node version related issues which are related to the app but not the underlying infrastructure.)
@ahaw021 node js uses proxy module to link the domain and localhost:port . so do not try it with domain:port/path .It will return assigned paths inside the code .ex : inside code if domain/contactus is created , it will return corresponding data.
problem here is redirection . so we need to check if its working properly with different blocks with manual configuration and rewrite rules other than certbot creates. so give an attempt.If the manual configuration works . we can strongly request someone to look after this certbots’ issue .
I’ve tested the default conf you posted, as is, just changing the domain names and the path to the cert and it is working fine, it is proxying the requests performed to defined locations so I wonder if you have another conf file for your domain that is taking priority over the requests.
Could you please show the output of these commands?.