Update apt-get
1 | apt-get update -y && apt-get upgrade -y |
1 | apt-get update -y && apt-get upgrade -y |
1 2 3 4 5 6 | add-apt-repository ppa:ondrej/nginx-mainline apt install -y software-properties-common apt -y update apt install -y php7.4 php7.4-fpm php7.4-cgi php7.4-mysql php7.4-common php7.4-mbstring php7.4-xml php7.4-curl |
1 | vi /etc/nginx/sites-available/example .com |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | server { listen 80; root /var/www/html ; index index.php index.html index.htm index.nginx-debian.html; server_name example.com; location / { try_files $uri $uri/ =404; } location ~ \.php$ { include snippets /fastcgi-php .conf; fastcgi_pass unix: /var/run/php/php7 .4-fpm.sock; } location ~ /\.ht { deny all; } } |
1 | ln -s /etc/nginx/sites-available/example .com /etc/nginx/sites-enabled/ |
1 | unlink /etc/nginx/sites-enabled/ default |
1 2 | cd / var /www chown -R www-data. * |