Update PHP to 8.3
This commit is contained in:
parent
e8db6b7b81
commit
b02af24655
@ -44,7 +44,7 @@ If the configuration passes, restart Nginx:
|
||||
|
||||
### PHP configuration
|
||||
|
||||
The php-fpm pool configuration is located in `global/php-pool.conf` and defaults to PHP 7.4. It will need modifying if you want the default php-fpm pool service to be a different PHP version. Additional PHP version upstream definitions can be added to the `/upstreams` folder (a PHP 7.3 sample is provided there). You can either use the default pool using `$upstream` in your nginx configurations or the specific upstream definition (i.e. php73, php72) setup by your custom upstream definitions.
|
||||
The php-fpm pool configuration is located in `global/php-pool.conf` and defaults to PHP 7.4. It will need modifying if you want the default php-fpm pool service to be a different PHP version. Additional PHP version upstream definitions can be added to the `/upstreams` folder (a PHP 8.3 sample is provided there). You can either use the default pool using `$upstream` in your nginx configurations or the specific upstream definition (i.e. php83, php82) setup by your custom upstream definitions.
|
||||
|
||||
For example, currently the nginx configuration for `single-site.com` has the following set for php requests:
|
||||
|
||||
@ -52,10 +52,10 @@ For example, currently the nginx configuration for `single-site.com` has the fol
|
||||
fastcgi_pass $upstream
|
||||
```
|
||||
|
||||
You could change that to the following to use the php 7.3 PHP service instead (assuming that php7.3-fpm service is running).
|
||||
You could change that to the following to use the php 8.3 PHP service instead (assuming that php8.3-fpm service is running).
|
||||
|
||||
```
|
||||
fastcgi_pass php73
|
||||
fastcgi_pass php83
|
||||
```
|
||||
|
||||
This effectively allows you to have different server blocks execute different versions of PHP if needed.
|
||||
|
||||
@ -1,12 +1,12 @@
|
||||
# Upstream to abstract backend connection(s) for PHP.
|
||||
# Additional upstreams can be added to /etc/nginx/upstreams/*.conf and then you just
|
||||
# change `default php74` to whatever the new upstream is (could be php73 for example).
|
||||
upstream php74 {
|
||||
server unix:/run/php/php7.4-fpm.sock;
|
||||
# change `default php74` to whatever the new upstream is (could be php83 for example).
|
||||
upstream php83 {
|
||||
server unix:/run/php/php8.3-fpm.sock;
|
||||
}
|
||||
|
||||
include /etc/nginx/upstreams/*.conf;
|
||||
|
||||
map '' $upstream {
|
||||
default php74;
|
||||
default php83;
|
||||
}
|
||||
@ -1,4 +0,0 @@
|
||||
# Defines the upstream for PHP 7.3
|
||||
upstream php73 {
|
||||
server unix:/run/php/php7.3-fpm.sock;
|
||||
}
|
||||
4
upstreams/php83.conf
Normal file
4
upstreams/php83.conf
Normal file
@ -0,0 +1,4 @@
|
||||
# Defines the upstream for PHP 8.3
|
||||
upstream php83 {
|
||||
server unix:/run/php/php8.3-fpm.sock;
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user