Skip to content

Commit b02af24

Browse files
committed
Update PHP to 8.3
1 parent e8db6b7 commit b02af24

File tree

4 files changed

+11
-11
lines changed

4 files changed

+11
-11
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,18 +44,18 @@ If the configuration passes, restart Nginx:
4444

4545
### PHP configuration
4646

47-
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.
47+
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.
4848

4949
For example, currently the nginx configuration for `single-site.com` has the following set for php requests:
5050

5151
```
5252
fastcgi_pass $upstream
5353
```
5454

55-
You could change that to the following to use the php 7.3 PHP service instead (assuming that php7.3-fpm service is running).
55+
You could change that to the following to use the php 8.3 PHP service instead (assuming that php8.3-fpm service is running).
5656

5757
```
58-
fastcgi_pass php73
58+
fastcgi_pass php83
5959
```
6060

6161
This effectively allows you to have different server blocks execute different versions of PHP if needed.

global/php-pool.conf

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# Upstream to abstract backend connection(s) for PHP.
22
# Additional upstreams can be added to /etc/nginx/upstreams/*.conf and then you just
3-
# change `default php74` to whatever the new upstream is (could be php73 for example).
4-
upstream php74 {
5-
server unix:/run/php/php7.4-fpm.sock;
3+
# change `default php74` to whatever the new upstream is (could be php83 for example).
4+
upstream php83 {
5+
server unix:/run/php/php8.3-fpm.sock;
66
}
77

88
include /etc/nginx/upstreams/*.conf;
99

1010
map '' $upstream {
11-
default php74;
11+
default php83;
1212
}

upstreams/php73.conf

Lines changed: 0 additions & 4 deletions
This file was deleted.

upstreams/php83.conf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Defines the upstream for PHP 8.3
2+
upstream php83 {
3+
server unix:/run/php/php8.3-fpm.sock;
4+
}

0 commit comments

Comments
 (0)