« Nginx and Ubuntu » : différence entre les versions
Apparence
Aucun résumé des modifications |
|||
Ligne 10 : | Ligne 10 : | ||
= Site configuration = | = Site configuration = | ||
== phpinfo == | == phpinfo == | ||
<filebox fn='/etc/nginx/sites-available/phpinfo.conf'> | <filebox fn='/etc/nginx/sites-available/phpinfo.conf' lang=nginx> | ||
server { | server { | ||
listen 80; | |||
root /var/www/php; | |||
index phpinfo.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; | |||
} | |||
} | } | ||
</filebox> | </filebox> |
Version du 8 août 2023 à 21:36
Install
ai nginx php-fpm
# check nginx and php-fpm are running
sc-status nginx
sc-status php8.2-fpm
|
Site configuration
phpinfo
/etc/nginx/sites-available/phpinfo.conf |
server {
listen 80;
root /var/www/php;
index phpinfo.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;
}
}
|