A
A
animanshnik2021-04-13 07:02:21
ubuntu
animanshnik, 2021-04-13 07:02:21

Flask not connecting by domain, only by IP, how to fix it?

Good afternoon. I put flask on the host, I can connect by IP, but not by domain. And the domain is tied correctly.
6075174dd243a908931566.jpeg
From the server it responds, and even with the necessary ip.
6075177549249563809159.jpeg
When you follow the link to the site itself, specifying the ip\port
607517a34d88a590112481.jpeg
When you follow the domain to the site, specifying the domain\port
607517b4ca921097772177.jpeg

What could I have done wrong? Somehow I forgot to specify something?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Dmitry, 2021-04-13
@animanshnik

Everything is fine there:

➜  ~ curl -v http://darklorian.site:5000
* Rebuilt URL to: http://darklorian.site:5000/
*   Trying 45.141.102.132...
* TCP_NODELAY set
* Connected to darklorian.site (45.141.102.132) port 5000 (#0)
> GET / HTTP/1.1
> Host: darklorian.site:5000
> User-Agent: curl/7.58.0
> Accept: */*
>
< HTTP/1.1 302 FOUND
< Server: gunicorn
< Date: Tue, 13 Apr 2021 04:27:33 GMT
< Connection: close
< Content-Type: text/html; charset=utf-8
< Content-Length: 219
< Location: http://darklorian.site:5000/login
<
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<title>Redirecting...</title>
<h1>Redirecting...</h1>
* Closing connection 0
<p>You should be redirected automatically to target URL: <a href="/login">/login</a>.  If not click the link.%
➜  ~

A
animanshnik, 2021-04-13
@animanshnik

I found out that for some reason it doesn’t work from a computer, it’s normal from a phone (when switching to LTE)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question