+5 votes
69 views
in Tips & Tricks by (242k points)
reopened
How does web hosting work?

1 Answer

+3 votes
by (1.6m points)
 
Best answer

How does web hosting work?
Rent whole computers?
The most important services
Other optional services
How do I use my web space?

Websites or private cloud storage can be set up with your own web space - if you know how hosters work and what you need..

image image

You can of course also operate a website without your own web space, for example through service providers such as Wordpress.com - but it always remains a very limited solution. If you want to know what exactly web hosts do and how they work, you can find all the basics here.

How does web hosting work?

Web hosting is about getting your own "place on the Internet". To do this, you need access to a computer that is permanently accessible via the same address over the Internet. And such servers are offered for rent by the web hosts, the providers. Services and storage space can then be used on the servers. So much for the somewhat simplified, abstract explanation. In practice, you usually don't rent a whole computer in a data center, but only a certain amount of storage space (web space) and various services . These services usually include web servers, e-mail and FTP (File Transfer Protocol) even in the smallest rental agreements. And very important: a domain . Computers on the Internet can be reached via IP addresses of the type 192.169.178.1, as you know them from your home network. In order for such an address to be accessible via a name, e.g. www.example.com, a domain must be registered and registered with the Domain Name System (DNS).

And this is exactly where the difference to your home computer lies : This is given a different IP address from time to time by the DSL provider. The computer at home can also be addressed with a fixed domain name via dynamic DNS (DDNS): Whenever you receive a new IP from the provider, your computer or router reports to the DDNS provider and updates the link between IP and domain. Why is it important? It's simple: You can use a NAS (Network Attached Storage) for website and cloud storage, for example - you no longer need web hosting. However, this is less reliable, the website is only as fast as your DSL upload bandwidth, the device must always be running and there are of course security concerns..

image
Your own NAS can also serve as web space via a DDNS service.

Rent whole computers?

Real rented web space has a number of advantages. The first question that arises is what you can rent . And here the bandwidth ranges from service and storage space to virtual servers to real complete computers . For private individuals, smaller projects and, above all, every web hosting novice, both complete real and virtualized computers are completely oversized.

On real (dedicated servers) and virtual servers you can handle everything, but you also have to set up and maintain web servers, e-mail and so on yourself - a lot of effort and expensive on top of that. Only the normal offers of storage space and services are of interest..

For a better assessment, here are two specific offers: At strato , the packages start at four euros per month - it looks similar with all other large providers. There is a domain, 50 gigabytes of storage space, two databases, two web applications (such as WordPress) and another 10 gigabytes for emails. The large providers are usually well equipped for beginners. An already semi-professional offer from a small provider like W3W could look like this in comparison: For 16.95 euros you get 150 GB of storage plus 250 GB of cloud storage, 2 GB for e-mails, 250 databases and two domains. On top of that, as a beginner, you will be dealt with dozens of terms, from cron jobs to CGI to SSL certificates. But what is it and what do you need?

The most important services

The basis is always a web server , otherwise no websites could be published. If it is to be a dynamic website, for example a blog with WordPress or an online shop with osCommerce, there are often two options: Systems intended for beginners usually offer the option of simply activating a "web application" such as WordPress with a click. If so, it is guaranteed to be on offer. If not, you need two things: A (MySQL) database and support for the PHP scripting language . With the PHP, web and database server equipment, you can already operate a large part of all web applications. And considering the prices, you shouldn't miss out on these features. Even if you don't need them yet, because moving later is often associated with immense effort.

In addition to the storage capacities, you should also keep an eye on the transfer volume - even if most offers (also W3W and strato) meanwhile do without a limit or set them very high.

image
An example of a more complex backend of your own web space.

Pretty much all other services and features are of secondary importance at first. Exception: If your website is expected to have 10,000 or more visitors a day immediately, you must also pay close attention to the performance of the offer . However, not every provider immediately reveals which processors or RAM are used. Let alone how many customers then have to share this hardware. But as I said: for most private users that hardly matters.

A very important point is unfortunately not that easy to clarify: Each provider offers its own administration interface - and this plays an enormous role in finding your way , especially for beginners. Unfortunately, the only thing that helps here is: try it out, if possible, and otherwise look for empirical values ​​on the internet. As a rule of thumb: End-user-oriented providers such as strato, 1 & 1 and so on are often more beginner-friendly than smaller hosting specialists such as W3W , who tend to address more experienced users.

Other optional services

You could (and have already) written entire books on the subject of web hosting, but the most important keywords and additional services that you should pay attention to can be dealt with very quickly:

User accounts Partly regulated for backend and FTP.
SSL / TLS certificates
Allows easy setup of HTTPS.
Web statistics
Evaluation of visitors and page views.
Scripting
In addition to PHP, Perl and Python could also be relevant.
WebDAV
Integrate web storage locally as a drive.
SSH access
Enables access to the web space via the terminal.
Cron jobs
Automatic execution of commands (task planning).
Database management
Preferably phpMyAdmin because it is the standard par excellence.
Subdomains
Allows addresses like projekt.example.com.
User accounts Partly regulated for backend and FTP.
SSL / TLS certificates
Allows easy setup of HTTPS.
Web statistics
Evaluation of visitors and page views.
Scripting
In addition to PHP, Perl and Python could also be relevant.
WebDAV
Integrate web storage locally as a drive.
SSH access
Enables access to the web space via the terminal.
Cron jobs
Automatic execution of commands (task planning).
Database management
Vorzugsweise phpMyAdmin, weil es der Standard schlechthin ist.
Subdomains
Ermöglicht Adressen wie projekt.example.com.

Everything to do with e-mails is actually comfortably equipped with all providers, but there is still one last popular area of ​​application that may be worth paying attention to separately: cloud storage . With a database and PHP, you can definitely run your own instance of the Dropbox alternative ownCloud. However, it is much easier if the provider offers a cloud solution directly - which usually also includes larger, separate storage space. OwnCloud is a keyword that clearly speaks in favor of an offer!

How do I use my web space?

Once such an offer has been booked, what happens next? Again, there are several options. The simplest is via the administration interface , i.e. the provider's own backend. Here you log into the browser as normal and can usually start web applications such as WordPress with a click and upload files via the web file manager. As I said, that depends on the provider.

The standard way is still via FTP and database management. Using the age-old File Transfer Protocol , you can easily connect to the folder structure of your webspace and upload or download files. Generally there is a folder called " Web Root ", " www " or often " htdocs " (for hypertext documents). This is the base folder for your website - this directory is called up in the browser when your domain is called up, e.g. example.com/. If there is a file called "index.php" or "index.html" in this folder, it will be called up by default. If the file is in the "Test" subfolder, you would have to call it up in the browser via example.com/test/.

image
Typical structure in the web space, here via FTP: In the "www" folder there are various websites to which individual domains are linked.

Modern web applications like WordPress also need a database . Here again it differs from provider to provider. There will be a link to the database administration somewhere in the backend - this is the second important place. If the standard phpMyAdmin tool already mentioned can be found here , all the better - because many instructions on the web refer to it exactly.

To get started there is also a kind of standard workflow that can be used to install most applications: First, the files of a content management system, for example (CMS) copied to the base folder. Then you call up the installation routine - in most cases this works simply via "example.com/cms" if the software is in the "cms" subfolder. The installation rarely has to be started more precisely, for example via an address like "example.com/cms/installation" - that depends on the system. And now either a complete set-up is started directly or a message appears that no database exists. If the installation routine cannot create this itself, you just have to create it yourself in the database administration. And since it is usually sufficient to give a name here, it is also very easy.

So again in a nutshell : Upload the web application via FTP, create an empty database, call up the web application in the browser - run through the installation. That doesn't always work, but most of the time.


...