Website works through <static_ip>:<port> but cannot figure out how to point

0

Hello,

I am using AWS LightSail with my website written using Python's Flask. The website itself works on my own machine and when I connect directly to <static_ip>:<port>. Going to <my_website>.com displays "’s server IP address could not be found."

The goal: Access the website through <my_website>.com

To achieve this, I put the four name servers into the custom DNS on namecheap.com. In LightSail DNS, I have A record set as @.<my_website>.com. I fiddled with these things recently, so this might be an issue.

I start my website through: gunicorn --bind 0.0.0.0:8000 wsgi:app

A lot of tutorials discuss nginx as a proxy server but I am not entirely sure if that's relevant. I believe it's simply to remove external access to the web app.

However, in https://blog.miguelgrinberg.com/post/the-flask-mega-tutorial-part-xvii-deployment-on-linux , he uses Nginx with ports 80 and 443, so I am a bit confused.

It is not entirely clear to me if Nginx is used for this and if so, how to adjust the config files to enable my use case.

It is also not clearly to me how I would even go about debugging this.

Edit:

I should add I have the instance, static ip, dns zone and a distribution. Though I suppose that's obvious from what I've written.

Edited by: jgybpe on Mar 4, 2021 12:51 PM

Edit:

Solved it by abandoning LightSail and going at it directly. This video helped:
https://www.youtube.com/watch?v=VedY6EjOBWM

Edited by: jgybpe on Mar 6, 2021 5:31 AM

jgybpe
asked 3 years ago167 views
1 Answer
0
jgybpe
answered 3 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions