I have hosted a Flask app using gunicorn on a port on my VM IP address. The app is accessible via http://ip_address:port. Now I want to access via a subdomain. I have the A record to redirect the subdomain and domain to the vm public IP.
I have installed nginx and it is perfectly hosting the default nginx page on when accessed via IP address but it giving an error ERR_CONNECTION_REFUSED when trying to access via IP address.
Can anyone point me to the right direction as to how I can resolve this error?Further, how can I redirect/reverse proxy the subdomain to ipaddress:port where my actual app is hosted with an SSL
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!
Hello,
Keep in mind that once you make your DNS change it might take up to 24 hours for the DNS cache to clear over the Globe before you could see the new records.
Can you share the Nginx server block that you are using here?
Also, here is a quick demo on how to do this with Docker, in your case it would be quite similar, but with your specific backend service:
Hope that this helps. 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.
From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.