Cart 0 Cart
🌐
Language & Currency
Langue & Devise
Language & Currency
← 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.…

🛡️ Gaming Anti-DDoS ⚡ NVMe 🇨🇦 100% Canadian ↩️ 7-day guarantee 🖥️ 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

Servers online

Launch your server
in 60 seconds.

Plans from $CA6.99 · Anti-DDoS Protection · 100% Canadian

NordikServer — Game Panel
$ server start
✔ Online in 2.4s — ready
[INFO] Panel ready · Resources allocated
[DDoS] Anti-DDoS shield: ACTIVE
Gaming Anti-DDoS
7-Day guarantee
Online in 60s
🇨🇦 Canadian host
99.99% Uptime
Loading