|
@@ -4,7 +4,7 @@ This applies to Debian Buster, but similar instructions should apply for other D
|
|
|
|
|
|
## What we will do
|
|
## What we will do
|
|
|
|
|
|
-- We will use PHP 8.1
|
|
|
|
|
|
+- We will use PHP 8.2
|
|
- We will use version v4.0.0 of 2fauth
|
|
- We will use version v4.0.0 of 2fauth
|
|
- We will setup to use an Sqlite database
|
|
- We will setup to use an Sqlite database
|
|
- We will use Nginx and PHP-FPM to serve our site on port `8000`
|
|
- We will use Nginx and PHP-FPM to serve our site on port `8000`
|
|
@@ -22,11 +22,11 @@ This applies to Debian Buster, but similar instructions should apply for other D
|
|
|
|
|
|
```bash
|
|
```bash
|
|
apt-get install -y --no-install-recommends \
|
|
apt-get install -y --no-install-recommends \
|
|
- php8.1 \
|
|
|
|
- php8.1-sqlite3 php8.1-mysql \
|
|
|
|
- php-xml php8.1-gd php8.1-mbstring \
|
|
|
|
|
|
+ php8.2 \
|
|
|
|
+ php8.2-sqlite3 php8.2-mysql \
|
|
|
|
+ php-xml php8.2-gd php8.2-mbstring \
|
|
unzip wget ca-certificates \
|
|
unzip wget ca-certificates \
|
|
- php8.1-fpm nginx
|
|
|
|
|
|
+ php8.2-fpm nginx
|
|
```
|
|
```
|
|
|
|
|
|
## Download the code
|
|
## Download the code
|
|
@@ -71,7 +71,7 @@ http {
|
|
error_page 404 /index.php;
|
|
error_page 404 /index.php;
|
|
|
|
|
|
location ~ \.php$ {
|
|
location ~ \.php$ {
|
|
- fastcgi_pass unix:/var/run/php/php8.1-fpm.sock;
|
|
|
|
|
|
+ fastcgi_pass unix:/var/run/php/php8.2-fpm.sock;
|
|
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
|
|
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
|
|
include fastcgi_params;
|
|
include fastcgi_params;
|
|
}
|
|
}
|
|
@@ -129,7 +129,7 @@ chmod 500 /usr/local/bin/composer
|
|
startretries=0
|
|
startretries=0
|
|
|
|
|
|
[program:php-fpm]
|
|
[program:php-fpm]
|
|
- command=/usr/sbin/php-fpm8.1 -F
|
|
|
|
|
|
+ command=/usr/sbin/php-fpm8.2 -F
|
|
|
|
|
|
[program:nginx]
|
|
[program:nginx]
|
|
command=/usr/sbin/nginx -g 'daemon off;'
|
|
command=/usr/sbin/nginx -g 'daemon off;'
|
|
@@ -155,14 +155,14 @@ chmod 500 /usr/local/bin/composer
|
|
|
|
|
|
```bash
|
|
```bash
|
|
mkdir -p /run/php /www/data/.composer
|
|
mkdir -p /run/php /www/data/.composer
|
|
- touch /run/nginx.pid /var/log/php8.1-fpm.log
|
|
|
|
|
|
+ touch /run/nginx.pid /var/log/php8.2-fpm.log
|
|
chown -R www-data \
|
|
chown -R www-data \
|
|
- /var/log/php8.1-fpm.log \
|
|
|
|
|
|
+ /var/log/php8.2-fpm.log \
|
|
/run/nginx.pid \
|
|
/run/nginx.pid \
|
|
/run/php \
|
|
/run/php \
|
|
/www/data/.composer
|
|
/www/data/.composer
|
|
chmod 700 /run/php /www/data/.composer
|
|
chmod 700 /run/php /www/data/.composer
|
|
- chmod 600 /var/log/php8.1-fpm.log
|
|
|
|
|
|
+ chmod 600 /var/log/php8.2-fpm.log
|
|
```
|
|
```
|
|
|
|
|
|
## Change user
|
|
## Change user
|