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:
via le dossier
static
C’est l’approche la plus spontanée.with a dedicated domain For better defined projects.
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
Danger
Publier un dossier sur le Web augmente fortement le risque de piratage. D’autant plus si vous utilisez des sites Web dynamiques : du code PHP sera exectué et aura accès à tout votre dossier personnel (Il pourra créer, modifier ou supprimer des fichiers librement).
Then you have to choose a domain name associated with this site. You have two possibilities:
Use a sub-domain of
club1.fr
family styleRent a domain name Like a pro!
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
Il faut distinguer “hébergement” et “location de nom de domaine” ! L’hébergement stocke les fichiers d’un site et les publie sur le web à une adresse IP spécifique, tandis qu’un nom de domaine est une interface plus agréable pour les humains, sensée pointer vers l’adresse IP d’un serveur.
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.
See also
L’entrée de FAQ “Est-il possible d'héberger un site Web avec un domaine externe ?”
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#
HTTP server primarily focused on performance. At CLUB1, it is mainly used as a “TLS endpoint” and “reverse proxy” in front of the various Web services, including the Apache server. — Wikipedia, Sources
- Apache#
Serveur HTTP très populaire, distribué sous license libre. HTTP étant le protocole du Web on parle aussi souvent de “serveur Web”. “Apache” est en fait un raccourci pour désigner “Apache httpd”.
Il est intéressant pour l’hébergement de pages Web personnelles, car il peut être configuré en cours d’exécution et par les utilisaturs finaux grâce aux fichiers
.htaccess
.At CLUB1, the Apache server is behind the “reverse proxy” Nginx. — Wikipedia, Sources