Panier 0 Panier
🌐
Langue & Devise
Language & Currency
Langue & Devise
← Retour à la base de connaissance
Article

Install an Nginx web server

Nginx is the most-used web server for static sites and reverse proxy — install plus first vhost. apt install -y nginx ufw allow 'Nginx Full' # opens 80 + 443 systemctl enable --now nginx Test: http://YOUR_IP should show the welcome page.…

🛡️ Anti-DDoS gaming ⚡ NVMe 🇨🇦 100 % canadien ↩️ Garantie 7 jours 🖥️ Pterodactyl ⚙️ AMD Ryzen 7 9800X3D
📚 Base de connaissance

Nginx is the most-used web server for static sites and reverse proxy — install plus first vhost.

apt install -y nginx
ufw allow 'Nginx Full'     # opens 80 + 443
systemctl enable --now nginx

Test: http://YOUR_IP should show the welcome page.

First site (server block)

nano /etc/nginx/sites-available/mysite
server {
    listen 80;
    server_name mysite.com www.mysite.com;
    root /var/www/mysite;
    index index.html;
    location / { try_files $uri $uri/ =404; }
}
mkdir -p /var/www/mysite
ln -s /etc/nginx/sites-available/mysite /etc/nginx/sites-enabled/
nginx -t && systemctl reload nginx
Always run nginx -t before reloading — it validates the syntax and avoids breaking all your sites.

Tu n'as pas trouvé ta réponse ?

Notre équipe canadienne répond en moins d'une heure, 7j/7.

Cet article t'a été utile ?

Powered by WHMCompleteSolution

Serveurs en ligne

Lancez votre serveur
en 60 secondes.

Forfaits dès 6,99 $CA · Protection Anti-DDoS · 100 % Canadien

NordikServer — Game Panel
$ server start
✔ Online in 2.4s — ready
[INFO] Panel ready · Resources allocated
[DDoS] Anti-DDoS shield: ACTIVE
Anti-DDoS Gaming
Garantie 7 jours
En ligne en 60s
🇨🇦 Hébergeur Canadien
99.99% Uptime
Chargement