1.1 KiB
1.1 KiB
12/24: Beginning of the server.
Updated packages and installed nginx
and php-fpm
Edited the nginx config located at/etc/nginx/sites-enabled/default
:
- Added
index.php
to line 44
# Add index.php to the list if you are using PHP
index index.html index.htm index.nginx-debian.html;
To:
# Add index.php to the list if you are using PHP
index index.php index.html index.htm index.nginx-debian.html;
- Uncommented lines 56, 57, 60, and 63
location ~ \.php$ {
include snippets/fastcgi-php.conf;
#
# # With php-fpm (or other unix sockets):
fastcgi_pass unix:/run/php/php7.4-fpm.sock;
# # With php-cgi (or other tcp sockets):
# fastcgi_pass 127.0.0.1:9000;
}
- Uncommented lines 68-70
location ~ /\.ht {
deny all;
}
The correct version of php-fpm
must be represented:
location ~ \.php$ {
include snippets/fastcgi-php.conf;
#
# # With php-fpm (or other unix sockets):
fastcgi_pass unix:/run/php/[version].sock;
# # With php-cgi (or other tcp sockets):
# fastcgi_pass 127.0.0.1:9000;
}
Where [version]
is the correct version, EG: php8.1-fpm
.