Hosting a Web Server

Ch. 2 of 514 mins3 Tasks

Host a company website on a local server, understand how browsers request pages over Port 80, and test HTTP replies.

Track Series

Chapters in this Track (Ch. 2 of 5)

2Hosting a Web Server
14m

Every time you open your browser to check a news article or read documentation, you use the Hypertext Transfer Protocol (HTTP). Developed in 1989, HTTP was built to let people share documents between computers over simple network links.

Today, almost every business runs a private Internal Web Server. Companies use these internal sites for staff directories, helpdesk tickets, and office announcements. Because the server stays inside the building, the website is fast and protected from the outside internet.

How Web Browsers Request Web Pages

HTTP works using a simple request and reply conversation. Your browser asks for a file, and the web server sends that file back:

  1. Opening the Door (TCP Handshake): Before exchanging any text, your computer and the server shake hands over the network to establish a reliable connection targeting Port 80.
  2. Sending the Request: Your browser sends a short text message asking for the home page:
    GET /index.html HTTP/1.1
    Host: 192.168.1.100
    Accept: text/html
  3. Server Sends the Reply: The web server looks up index.html on its drive and sends it back with a status code:
    HTTP/1.1 200 OK
    Content-Type: text/html
    
    <html><body><h1>Welcome to the Office Intranet</h1></body></html>
  4. Browser Shows the Page: The browser reads the HTML code, sets up colors and fonts, and displays the final visual page on your screen.

Notice that modern webpages rarely contain only text. When your browser downloads the initial HTML file, it scans the document for references to company logos, style sheets, and scripts. For each referenced resource, the browser opens another request to Port 80 until every image and asset appears on your screen.

Status Code Status Name What It Means in Practice
200 OK Success The server found the file and sent it back without problems.
301 Moved Redirect The page moved to a new address; your browser goes to the new link automatically.
403 Forbidden Access Denied The file exists, but your user account does not have permission to view it.
404 Not Found Missing File You typed a link or file name that does not exist on the server.
500 Error Server Trouble The server software had an internal error while trying to build the page.

Why HTTP Uses Port 80

When you type http://192.168.1.100 into your browser address bar, you do not need to write :80 at the end. Web browsers automatically assume Port 80 whenever you type http://. If you configure a web server on a non-standard port like 8080, users must type http://192.168.1.100:8080 to reach it.

Internet standards bodies reserved ports below 1024 as well-known ports so that clients do not have to guess where a service lives. On Unix-like operating systems, binding to Port 80 requires administrator privileges, which provides an extra layer of security so normal user programs cannot hijack official company websites.

Field Incident: The Accidental Port Conflict

In real office deployments, a common issue occurs when someone installs two programs on the same server that both want Port 80. For example, if a developer installs a local testing server while an existing company intranet is already running, the second software will fail to start. It displays a message saying "Address already in use".

Only one program can listen to a single port on a single IP address at the same time. Learning how Port 80 works allows network engineers to verify that the web service is bound to the right port and running properly.

HTTP vs. HTTPS

Standard HTTP (Port 80) sends data in plain text. Anyone on the local network can read passwords or files in transit. Modern networks use HTTPS on Port 443, which encrypts traffic so only the server and client can read it.

The Bridge to Name Lookups

Now our office server reliably hosts the company intranet on Port 80, and any workstation can open it by typing http://192.168.1.100. But how many of your co-workers will remember that IP address next week? What if that server hardware needs to be upgraded and its IP changes? In our next chapter, we will see how a DNS Server gives that numeric address a friendly name that everyone can remember.

In your hands-on lab on the right, you will connect to the web server by entering its numeric IP address directly. As you do, notice how simple the HTTP transaction is, and why adding a name service will be the logical next step for corporate usability.

Hands-On Practice Checklist

Progress:0 / 3

Perform actions on the practice lab canvas on the right. Tasks automatically check off as you connect cables and run commands.

Task 1: Inspect Intranet Web Server HTTP Daemon

Click Intranet Web Server on the canvas, switch to the Services tab, and click HTTP. Confirm that the service is active and listening on Port 80.

Task 2: Open Web Browser App on Workstation PC-1

Click Workstation PC-1, navigate to the Desktop tab, and click the Web Browser application icon to open the virtual browser.

Task 3: Navigate to Web Server IP Address

In the Web Browser URL bar, enter "http://192.168.1.100" and click Go (or press Enter) to load the intranet homepage.