diff --git a/README.md b/README.md index 2ec129b..50ec4a4 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/global/php-pool.conf b/global/php-pool.conf index 24203bf..385ae67 100644 --- a/global/php-pool.conf +++ b/global/php-pool.conf @@ -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; } \ No newline at end of file diff --git a/upstreams/php73.conf b/upstreams/php73.conf deleted file mode 100644 index ced6897..0000000 --- a/upstreams/php73.conf +++ /dev/null @@ -1,4 +0,0 @@ -# Defines the upstream for PHP 7.3 -upstream php73 { - server unix:/run/php/php7.3-fpm.sock; -} \ No newline at end of file diff --git a/upstreams/php83.conf b/upstreams/php83.conf new file mode 100644 index 0000000..fd97caf --- /dev/null +++ b/upstreams/php83.conf @@ -0,0 +1,4 @@ +# Defines the upstream for PHP 8.3 +upstream php83 { + server unix:/run/php/php8.3-fpm.sock; +} \ No newline at end of file