Websites hosting#

Website hosting is historically the first service made available to CLUB1 members.

Important

The freedom to experiment is at the heart of CLUB1’s principles: A CLUB1 member account is not limited to a single website! There is no limit to the number of web projects to host as long as it does not saturate the server 😄.

There are two ways to host content that will be accessible on the Web with the server:

static folder#

The personal space has a special static folder at its root. All files and folders that it contains are automatically published on the Web at https://static.club1.fr, for instance:

https://static.club1.fr/nicolas/test.html/home/nicolas/static/test.html

Warning

The static folder is limited to static websites. To host dynamic websites, you must use a dedicated domain.

C’est l’endroit idéal pour débuter et commencer à mettre en ligne rapidement.

See also

The tutorial “My first steps on the Web!” to learn how to make your first website with the static folder.

Hosting with a dedicated domain name#

Unlike the static folder that is at a fixed location, you are free to choose the location of the files that will be used.

It is recommended to create a folder in your personal space that will be used for all your websites. Inside, you can create a folder per site. For example, here we called the folder for web projects www (for World Wide Web):

📁 www
    📁 mon-site-pro
    📁 mon-site-perso
    📁 blog-famille

Then you have to choose a domain name associated with this site. You have two possibilities:

Use a subdomain of club1.fr#

To facilitate the creation of projects and help spontaneity, the use of subdomains of club1.fr by members is encouraged!

This has the advantage of being free, and of requiring no maintenance, unlike renting a domain name. The disadvantage being to depend on club1.fr. This also leads to a visible relationship with CLUB1, which can be bothersome or interesting depending on the project.

Tip

It is possible at any time to redirect a subdomain of club1.fr to any other domain of your choice. This allows for example to start via this method and later, to rent a domain name without breaking any links!

To request a sub-domain of club1.fr, it is necessary to contact the system administrator, by specifying towards which folder in its personal space will have to point the domain.

Warning

Remember to check that the subdomain is available before sending a request! 😉 It must only consist of lowercase letters, numbers or hyphens -.

Have sub-subdomains#

C’est effectivement possible de descendre encore un niveau dans la filiation de domaine. Par exemple, si l’on utilise déjà yaourt.club1.fr, on peut aussi demander à créer fraise.yaourt.club1.fr. Cependant, cela nécessite actuellement la création d’un certificat Let’s Encrypt supplémentaire par sous domaine, ce qui n’est pas anodin. Donc pour l’instant, mollo sur les sous.sous.domaines 🐌 !

Rent an external domain name#

It is possible to rent a domain name from a registrar. This often costs about ten euros per year, but it can vary depending on the TLD chosen.

Important

There is a difference between hosting and domain name rental! Hosting stores a site’s files and publishes them on the Web to a specific IP address, while a domain name is a more human-friendly interface that is supposed to point to a server’s IP address.

It is therefore perfectly possible to have a web site hosted on the CLUB1 server without using a sub-domain of club1.fr.

Before buying your domain name, take the time to discuss it! There will be a small series of adjustments to make and it’s worth talking about so that everything goes smoothly.

Management#

None of these actions are automated or accessible via a web interface. It is therefore necessary to discuss it between humans 🍺! This is part of the artisanal aspect and the deliberately human scale of the server management.

To associate one of your folders with a domain name, you must send an email to webmaster@club1.fr indicating the path of your folder and the chosen domain name.

For example:

Bonjour, je souhaiterai que mon dossier "www/mon-site-perso" soit publié à "vacances.club1.fr"

Advanced#

Some techniques related to website hosting on the server.

File Index#

The websites are served by the HTTP server Apache. It is configured to automatically generate an index displaying the list of files and folders it contains.

To avoid displaying this index, it is possible either to create an index.html file which will contain the page to be displayed instead, or to add a hidden Apache .htaccess configuration file containing at least the following line:

Options -Indexes

Software#

Nginx#

Serveur HTTP principalement axé sur les performances. Chez CLUB1, il est surtout utilisé en tant que “point de terminaison TLS” et “proxy inverse” devant les différents services Web, notamment le serveur Apache. — Wikipedia, Sources

Apache#

Very popular HTTP server, distributed under free license. HTTP being the protocol of the Web we also often speak of “Web server”.

Apache is attractive for hosting personal web pages because it can be configured at runtime and by end users through .htaccess files.

At CLUB1, the Apache server is behind the “reverse proxy” Nginx. — Wikipedia, Sources

PHP-FPM#

PHP process manager, allowing a Web server to execute PHP code in a high-performance manner. It is also able to run PHP with different users. — Sources