Learn some fundamental networking vocabulary and concepts before practically applying them to a web server, including TCP/IP, HTTP, and hostnames.
- [Instructor] The internet is a fantastic, complex, and continuously evolving modern marvel. Its power comes from the focus on the message, not on the medium, meaning you can produce and consume content without having to understand how it all works. With that said, the real fun comes from knowing how this thing is put together, so we can contribute our own unique ideas and systems. Broadly speaking, this course is about practically demystifying how the internet works, specially in the context of PHP.
This chapter provides the what and why of web servers in both abstract and practical ways. We'll apply these lessons throughout the rest of this course. It's important to have a common vocabulary and context before introducing more complex ideas. Let's start with some fundamental networking concepts that are useful for understanding how you'll be connecting to and configuring your server. The internet that we're using is built using the Internet Protocol Suite, which is a standard for the model and communication protocols used.
When this architecture was first developed, the original protocols included the Transmission Control Protocol, or TCP, for data transport and the Internet Protocol, or IP, for routing and addressing request for information. Today, the Internet Protocol Suite contains dozens of additional standards, but is commonly referred to as TCP/IP because of these two original protocols. Another protocol that's included is the Hypertext Transfer Protocol, also known as HTTP.
HTTP is the standard for the exchange of HTML documents. In practical terms, web servers use HTTP to transfer webpages. Web servers run on hosts, which are computers or devices on a network. Hosts can provide information to each other across a network such as an application, documents, and other resources. Hosts communicate using a standard protocol such as those found on the Internet Protocol Suite, like HTTP.
Each host can have an IP address, which is used to route requests to a specific computer. An example of an IP address is 22.214.171.124. If you're anything like me, remembering sequences of numbers is something that I like to delegate to computers. To give networking more semantic context, hostnames provide human-readable labels for a host that map to an IP address. That way, instead of trying to remember a website's IP address, you can just type in info.cern.ch to see the world's first website from 1990.
That hostname maps to a single IP address, which we saw before. Something interesting to note, while each hostname can only map to a single live IP address multiple hostnames can have the same IP address. In fact, we'll be using this technique later in the course. To recap, the internet basically is a network of hosts or computers. Each host is accessible by its hostname, which maps to an IP. A host can send HTML documents over HTTP.
So, how do webpages get served?
Note: The demonstrations use the Ubuntu distribution of Linux, but the skills are applicable to other Linux distributions.
- What is Linux and why should you use it?
- Choosing a Linux distribution
- Creating a virtual machine (VM)
- Managing Linux from the command line
- Configuring a Linux server
- Managing Apache sites and modules
- Configuring the MySQL database
- Configuring PHP for development
- Debugging PHP code in Linux
- Installing PHP tools such as Composer and CodeIgniter
- Managing VMs with VirtualBox
- Troubleshooting LAMP