M
M
Mokony2022-01-30 13:57:04
local server
Mokony, 2022-01-30 13:57:04

How to create a local web server on a fixed domain home network?

Hello everyone, You need to create a local web server, when you connect to it via wifi
from your phone, you can go to a certain site that lies on the server

.
started a local server (python -m http.server). After these actions, having connected on the phone to wifi, which distributes the computer and writing in the address bar of the browser the ip of the computer and the port through ":" I entered the site. Is it possible to make a site domain so that it is fixed and does not consist of ip?

It is not necessary to use a computer as a device that creates this local server, you can also use an ESP32 or something like it

Thanks in advance for your answers

A little more clarification on the question

Roughly speaking, you need to do it like when connecting to wifi in the subway, but with an independent entrance to the site, and not automatic, as there.
Those. there is such a local server on different trains, the ip of these servers is most likely different for all (as I understand it, it will not work to bind the domain by ip), when we connect to wifi, we get access to the site (authorization takes place there, but now it it doesn't matter) and the site is there with a fixed domain.

The phone needs a permanent address, because I write down exactly the fixed address in the webview application

Answer the question

In order to leave comments, you need to log in

3 answer(s)
D
DevMan, 2022-01-30
@Mokony

elementary.
the simplest thing is to buy a domain and set the A-record to the server address in your network.
cheaper, but more confusing - you raise your own dns server in your network.

A
Alexander Karabanov, 2022-01-30
@karabanov

If the router allows, then specify in the DNS settings an entry that will point to the IP of the server.
If not, write an entry like this in the hosts file x.x.x.x example.com, where xxxx is the IP of the server.

D
Drno, 2022-01-30
@Drno

Either buy a domain and bind to your external IP
Or your DNS should know it and distribute it to clients (phone)
Or manually edit the host file on the phone (which they say)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question