Custom domain routing to a Flask server with a custom domain always displayed in the address bar

I have a small Flask home server program configured for IP a.b.c.d. I also have a domain name xyz.com.

Now I would like xyz.comfor the content to be provided when switching to the user a.b.c.d, but xyz.comis still displayed in the address bar. Similarly, when switching to, you xyz.com/fooshould display the contents of a.b.c.d/foo, while being xyz.com/foodisplayed in the address bar.

I have route forwarding activated by my domain name provider, therefore it is xyz.com/foocorrectly redirected to a.b.c.d/foo, but when moving there it is a.b.c.d/foodisplayed in the address bar.

I am currently running a tornado, but if necessary, I can switch to another server.

Is it possible to configure such a solution? Or is my only option to buy some kind of hosting?

+4
source share
1 answer

I managed to solve this on my own, but I will add this as an answer, since it is obvious that someone thought it was a worthwhile question.

, , DNS, DNS . " ", , , . , , DNS DNS A, xyz.com a.b.c.d. , , , , , , .

+3

Source: https://habr.com/ru/post/1543877/


All Articles