GNU/Linux >> Linux Esercitazione >  >> Debian

Come installare Nginx su Debian 9

Nginx è un server web e reverse proxy open source noto per elevate prestazioni e basso consumo di risorse. È spesso usato per gestire un numero elevato di connessioni simultanee.

Installazione

sudo apt update
sudo apt install nginx
sudo systemctl status nginx

Configurare il firewall

Con firewalld:

sudo firewall-cmd --permanent --zone=public --add-service=http
sudo firewall-cmd --permanent --zone=public --add-service=https
sudo firewall-cmd --reload

Con iptables:

sudo iptables -A INPUT -p tcp --dport 80 -j ACCEPT
sudo iptables -A INPUT -p tcp --dport 443 -j ACCEPT

Gestione del servizio

sudo systemctl stop nginx
sudo systemctl start nginx
sudo systemctl restart nginx
sudo systemctl reload nginx
sudo systemctl enable nginx
sudo systemctl disable nginx

Struttura dei file

  • Configurazione principale: /etc/nginx/nginx.conf.
  • Virtual host disponibili: /etc/nginx/sites-available.
  • Virtual host attivi: /etc/nginx/sites-enabled.
  • Root web predefinita: /var/www/html.
  • Log: /var/log/nginx/access.log e /var/log/nginx/error.log.
Debian
  1. Come Installare un Server Git HTTP con Nginx su Debian 11

  2. Installare un server FTP su Debian 10 con vsftpd

  3. Installare Typora su Ubuntu e Debian

  4. Installare MariaDB su CentOS 7: guida passo passo

  5. Installare Todoman su un server Debian 11 Bullseye: guida passo per passo

Installare ONLYOFFICE Document Server su Debian 10 con Nginx e HTTPS

Installare Nginx con PHP-FPM su Debian 11 per un server web veloce

Installare Cockpit su Debian 9 con reverse proxy Apache

Installare Nginx su Debian 7

Come installare Nginx su un server cloud Debian 8.2

Installare phpMyAdmin su Debian 11 con Nginx