Nginx uWSGI and Ubuntu

De Banane Atomic
Version datée du 9 août 2023 à 11:42 par Nicolas (discussion | contributions) (Page créée avec « Category:Ubuntu = Install = <kode lang='bash'> ai nginx uwsgi-plugin-php # check nginx is running sc-status nginx </kode> {{warn | With Ubuntu 20.04, ondrej ppa and PHP 8.2 installed, the following dependencies are wrongly installed: php7.4-cli php7.4-common php7.4-json php7.4-opcache php7.4-phpdbg php7.4-readline}} = Site configuration = <kode lang='bash'> # enable a web site sudo ln -s /etc/nginx/sites-available/phpinfo.conf /etc/nginx/sites-enabled/phpi... »)
(diff) ← Version précédente | Voir la version actuelle (diff) | Version suivante → (diff)
Aller à la navigationAller à la recherche

Install

Bash.svg
ai nginx uwsgi-plugin-php

# check nginx is running
sc-status nginx
With Ubuntu 20.04, ondrej ppa and PHP 8.2 installed, the following dependencies are wrongly installed: php7.4-cli php7.4-common php7.4-json php7.4-opcache php7.4-phpdbg php7.4-readline

Site configuration

Bash.svg
# enable a web site
sudo ln -s /etc/nginx/sites-available/phpinfo.conf /etc/nginx/sites-enabled/phpinfo.conf
sc-restart nginx

phpinfo

/etc/nginx/sites-available/phpinfo.conf
server {
    listen 80;
    root /var/www/php;
    index info.php;
    server_name phpinfo.net;

    location ~ \.php$ {
        include snippets/fastcgi-php.conf;

        # With php-fpm (or other unix sockets):
        fastcgi_pass unix:/run/php/php8.2-fpm.sock;
    }
}