Telegram- 👇 😉
-
. WIKIMERIONET
Merion Mertics , ,

CRM

4

Nginx - HTTP-- . , . -, -, , HTTP- .

 Nginx  Linux

Nginx LEMP, , - -. LEMP LAMP. , Nginx, Apache -.

Nginx Windows. , Nginx Linux.


Nginx

Nginx Linux.

Nginx CentOS 8

, , . :

sudo yum update

Nginx, . RPM, RPM:

sudo yum info nginx
yum info nginx

Nginx CentOS 8 :

sudo yum install nginx
yum install nginx

Nginx CentOS 7

Nginx EPEL. EPEL, :

sudo yum install epel-release

Nginx :

sudo yum install nginx	

EPEL , yum GPEL EPEL:

Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
Importing GPG key 0x352C64E5:
Userid     : "Fedora EPEL (7) "
Fingerprint: 91e9 7d7c 4a5e 96f1 7f3e 888f 6a2f aea2 352c 64e5
Package    : epel-release-7-9.noarch (@extras)
From       : /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
Is this ok [y/N]:

y Enter.

Nginx Ubuntu Debian

Nginx Ubuntu Debian .

:

sudo apt update

Nginx:

sudo apt install nginx

nginx

nginx :

sudo systemctl start nginx

, :

sudo systemctl enable nginx

, , Nginx - active (running):

sudo systemctl status nginx
systemctl status nginx

Nginx :

sudo systemctl stop nginx

Nginx:

sudo systemctl restart nginx	

, :

sudo systemctl reload nginx	

firewall

Nginx firewalld, , 80 (HTTP) 443 (HTTPS) -. , .

firewall CentOS

HTTP HTTPS :

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

firewall Ubuntu Debian

UFW (Uncomplicated Firewall) , , Nginx Full, :

sudo ufw allow 'Nginx Full'

nftables, :

nft add rule inet filter input tcp dport {80, 443} ct state new,established counter accept

netstat, , 80 443:

netstat -tulpn

IP- . IP- , :

ip addr
ip addr

- IP- ( ) URL. Nginx, , .

nginx

Nginx

Nginx . Nginx , . , .

  • Nginx: /etc/nginx
  • Nginx: /usr/share/nginx/html
  • : /etc/nginx/nginx.conf
  • Nginx (access.log error.log): /var/log/nginx/

. , . :

  • /home/user_name/site_name
  • /var/www/site_name
  • /var/www/html/site_name
  • /opt/site_name