If you want to use hypha to build a website it helps to have a basic understanding of what happens when you browse to a site.
Web page data flow
- Someone starts a webbrowser (e.g. Firefox, Chrome or Explorer) and navigates to a webpage. This can be done by clicking on a link (e.g. from a search engine like DuckDuckGo or Google) or by typing a url in the address field. The webbrowser is called a client.
- A page request is sent to the computer that is associated with the url. This computer is called a server and can be:
- the same computer as the one that runs the webbrowser. In this case the computer is called a local server.
- a computer that is connected through the internet. In this case the computer is called a remote server.
- a set of programs that offer the same possibilities but aren't necessarily associated with one physical computer. This is called a virtual machine. One physical computer can host multiple virtual machines, but a virtual machine can also be distributed over several physical computers. Common implementations of this concept are a VPS, or a Docker image.
- A program on the server receives the page request and decides what to do with it. Hypha makes use of Apache, which is a
program that can receive page requests from multiple clients. For each
page request it receives it calls another program to generate HTML content.
- Hypha uses php for this, a programming language that can be used to
process information from different sources and generate HTML documents
from it that a browser can display.
- The output of php is sent to Apache which passes it on to the client.
- The client displays the HTML it in the browser window.
Computer language vs human language
Now that we have the greater picture in mind there are a few more things to know, mainly to support human readable urls.
To start with, computers connected through a network identify each other using an IP-address. This is a number that looks like this: 192.168.1.123. In contrast, humans prefer to identify things by names, e.g. www.hypha.net for a computer that serves HTML documents about the networking tool names hypha.
To interpret between the two languages we make use of DNS. This is a registry that keeps records of the connections between IP addresses and domain names.
This means that if you have access to a server that is connected to the internet and you install Hypha on it, you also will have to register a domain name and make it refer to the IP-address of your server in order to make it accessible in a convenient way. In short: domain names and the DNS facilitate navigation to a website.
The other thing to note has to do with navigation within the website.
We prefer to navigate pages on a website in a way that offers some logical structure, like hypha.net/en/home for the english language home page on hypha.net. This would require all pages to be organized in a folder structure whereas actually all pages are composed by a single piece of code code out of various bits of content that are stored in different places on the server.
The solution is to use the Apache rewrite feature which allows us to send all page requests within a certain sublevel to the same piece. This piece of code then concludes that for a url like hypha.net/en/homepage the first descriptor after hypha.net refers to a language and the second to a page name.
>> Go back to requirements or move on to server setup.