How To Make a Web Server Out of Your Computer
The story begins with DNS (Domain Name System), and IP addresses which I spoke about in my previous post. Every device connected to the internet has an IP address, including servers like google! 8.8.8.8 is the standard IP address for google.com
Every site we visit(including hashnode), can be identified by an IP address. Wouldn't it be tasking to try and remember all the IP addresses of your favorite websites before you can access them? This is where the DNS steps up. DNS maps domain names (that we can read and recall) to their various IP addresses. What then is the function of a web server? A web server is simply a larger computer that runs websites and delivers web pages to the users. Our computers may typically run on RAM sizes from 4GB to 12GB. However, popular web servers that get hundreds and thousands of requests in real-time, make use of large RAM sizes that run into terabytes. To check if your computer can function as a web server, first you need to find out your IP address. This post will be using the popular windows 10 for the demonstration.
Open the command line on your windows by searching for CMD. When it opens, run the command, 'ipconfig/all'. This gives you all the details of your computer like IP and MAC address.
When you click enter, it displays all details including your ipv4 address which you would copy and paste into your browser.
On pasting, it displays an error message in the browser. Now, to make it a proper web server, take the following steps:
- Press the Windows key + r, and type in 'control panel'.
- Click okay and open programs and features
- Click on Turn off and on windows feature
- A dialogue box will be opened. Search for Internet Information service. Expand it by clicking the plus sign on the left side of the box. Check the Internet information service box, Web Management Tools box, and World Wide Web service box.
- Click on okay and allow windows to apply changes
Return to your command prompt and copy the IPv4 address again
- Paste on your browser and watch it link to an IIS service
This is a simple example of configuring a web server. The site is not secured yet, but other configurations and additions can be made to it.