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
已提问 3 年前180 查看次数
1 回答
0
jgybpe
已回答 3 年前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则