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 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南