Hébergement web - Web Hosting


 


Inscription

1- Architecture Client–Serveur

Le web fonctionne avec deux acteurs :

Client

navigateur web

ordinateur ou smartphone

Serveur

machine qui héberge les sites

Exemple de Client (Navigateurs web) :

Google Chrome

Mozilla Firefox
Microsoft Edge

Exemple de Serveur Web

Logiciels serveur :

Apache HTTP Server

Nginx

Le serveur :

stocke les fichiers

répond aux requêtes

2- Fonctionnement d’une requête web

Utilisateur --> Navigateur --> Serveur web --> Réponse (HTML / CSS / JS)

3- Qu’est-ce qu’un hébergement web ?

Un hébergement web permet :

stocker un site

le rendre accessible sur Internet
exécuter du code (PHP, etc.)

Exemples d’hébergeurs :

Hostinger

OVHcloud
Godaddy

4- Nom de domaine

Un nom de domaine est l’adresse du site.

Exemple :

Il remplace une adresse IP difficile à retenir.

DNS + Client-Serveur

Client → DNS → Serveur Web → Page Web

5- Types d’hébergement

Il existe plusieurs types :

mutualisé

VPS
serveur dédié
cloud

5-1- Hébergement mutualisé

Principe :

Serveur
├ site1
├ site2
├ site3

Avantages :

simple

économique
facile à gérer

5-2- VPS

Principe :

Serveur physique
├ VPS 1
├ VPS 2
├ VPS 3

Avantages :

plus de contrôle

meilleures performances

5-3- Serveur dédié

Principe :

Serveur entier pour un seul client

Avantages :

très performant

contrôle total

6- Workshop: Création du site web codingskillsacademy.com

Cliquer sur ici pour s'inscrire à Hostinger (Hébergeur Web)
public_html/

index.php

cours.php
lecons.php
exercices.php
projets.php
contact.php

style/
style.css

includes/
menu.php
footer.php
connexion.php

cours/
html.php
css.php
php.php

Dossiers

css/
images/
js/
includes/
pages/

Structure

public_html/

index.php

css/style.css

images/logo.png

js/script.js

includes/menu.php

pages/cours.php

Création de la Base de données

CREATE TABLE  (

id INT AUTO_INCREMENT PRIMARY KEY,

username VARCHAR(50) UNIQUE NOT NULL,

email VARCHAR(100) UNIQUE NOT NULL,

password VARCHAR(255) NOT NULL,

first_name VARCHAR(100),

last_name VARCHAR(100),

role ENUM('student','teacher','admin') DEFAULT 'student',

status ENUM('active','inactive') DEFAULT 'active',

created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,

last_login DATETIME

);

CREATE TABLE courses (

id INT AUTO_INCREMENT PRIMARY KEY,

title VARCHAR(200),

description TEXT,

teacher_id INT,

created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP

);

CREATE TABLE lessons (

id INT AUTO_INCREMENT PRIMARY KEY,

course_id INT,

title VARCHAR(200),

content TEXT,

video_url VARCHAR(255),

created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP

);

CREATE TABLE enrollments (

id INT AUTO_INCREMENT PRIMARY KEY,

user_id INT,

course_id INT,

enrolled_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP

);

CREATE TABLE articles (

id INT AUTO_INCREMENT PRIMARY KEY,

title VARCHAR(200),

content TEXT,

author_id INT,

created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP

);

CREATE TABLE comments (

id INT AUTO_INCREMENT PRIMARY KEY,

article_id INT,

user_id INT,

comment TEXT,

created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP

);

CREATE TABLE exercises (

id INT AUTO_INCREMENT PRIMARY KEY,

lesson_id INT,

title VARCHAR(200),

description TEXT,

created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP

);

Serveur FTPpw: %%_Oc5b_4Nx1*9/%


Aucun commentaire:

Enregistrer un commentaire