notes/software/Specify Server.md

45 lines
1.1 KiB
Markdown
Raw Permalink Normal View History

2022-12-28 22:44:02 +00:00
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;
}
```
2023-01-06 17:33:20 +00:00
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`.