Answer the question
In order to leave comments, you need to log in
How to create a public web server on your linux pc?
Please send detailed instructions on how to create a public web server at home on linux debian, and so that you can connect to it from other computers, for example, a friend from your own computer.
Answer the question
In order to leave comments, you need to log in
Speaking "top-level", then:
1. Register a domain name and set up A-records. Or raise and configure a DNS server. Or add an entry about your site to the /etc/hosts file of a friend.
2. Get a "static" IP address and make your IP address accessible from a friend's computer.
3. Raise some web server (apache, nginx) on your computer and configure it.
4. Place your site in the root folder of the web server.
Now ask specific questions on the points indicated.
It seems that human laziness is limitless, there are a lot of manuals on the internet on the author's question! But he is too lazy to type in a couple of lines in the search engine and read the manuals, instead he lazily throws a request - anuka throw me all the info and chew what's what, but he wants to do nothing less than his own server, such help actually costs money
1) You need to find out if there is a connection between your friend and you.
The fact is that providers usually offer a connection through NAT, when the user is given an IP address from the "10.*.*.*" pool, and the user's requests to the outside are subjected to NAT masquerading at the exit. And communication between users is usually blocked.
Many users install a router that even makes NAT - this creates another barrier to access the computer (and at the same time protects the computer from a number of hacker attacks).
Let's say your friend is connected to another provider (or to another NAT pool of the same provider) - then he is considered as an external client. In this case, you need to get an external unchanged IP address from your provider. The provider's employees should explain to you what to do; but with a high probability they will refuse to do so. And if they agree, it costs money comparable to renting a virtual server.
If you have a router, then you need to configure port forwarding on it. Look at the router settings - it should be there.
Please note that the router's Web interface usually hangs on port: 80.
2) If you want to use a domain name, then you need to get a domain name. Well, or if only one person will apply, then he can register this name for himself in the hosts file.
3) Now it is fashionable to use HTTPS, and it needs certificates. The certificate can be bought for money. Or you can make your own certificate and have a friend embed it in their browser.
If HTTP is dispensed with, then the provider can stick their advertising into your site, many have been doing it for so long.
A static IP address that is visible from the Internet, and then - buying a domain name and setting up DNS from the same domain name seller.
As a rule, it doesn't make much sense to just "a friend from next door visits the site" due to certain financial costs for
1. statics
2. cost of a domain name
Here's the tutorial: https://www.google.com/amp/www.linuxandubuntu.com/...
It's in 2 parts.
For detailed instructions, google. The work of writing such an instruction, yes, up-to-date, but with examples, costs money, as Nordman99 quite rightly noted .
A small checklist:
- the presence of a static IP
- the presence of a domain name
- the presence of a web server program on the computer and the ability to configure it
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question