By ankitlukhi
I’m using the Nginx server for my node js application deployment. my domain (http://tisbeta.com:9002/) Is working well without HTTPS on different ports like 9001 and 9002 but when I install the let’s encrypt SSL certificate the port stops working(https://tisbeta.com:9002 ).im try so many solutions but not working.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Hi @ankitlukhi,
Can you post here your Nginx conf for HTTPS? I would assume Let’s Encrypt installs the default config for 443 and does not take into account the reverse proxy you have configured.
Hi there,
What I could suggest here is to use Nginx as a reverse proxy as described here:
That way your application will be running locally on http://localhost:9002 and the Nginx proxy will be forwarding the traffic from HTTPS to that internal port, for example:
server {
...
location / {
proxy_pass http://localhost:9002;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}
...
}
Let me know how it goes!
Best,
Bobby
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.