The Nautilus application development team is planning to launch a new PHP-based application, which they want to deploy on Nautilus infra in Stratos DC. The development team had a meeting with the production support team and they have shared some requirements regarding the infrastructure. Below are the requirements they shared:
nginx on app server 1 , configure it to use port 8093 and its document root should be /var/www/html.php-fpm version 8.2 on app server 1, it must use the unix socket /var/run/php-fpm/default.sock (create the parent directories if don’t exist).php-fpm and nginx to work together.curl http://stapp01:8093/index.php command from jump host.Login into App Server and run the following commands:
sudo dnf update -y
sudo dnf install nginx -y
sudo dnf module install php:8.2 -y # change version here if requires
Configure php-fpm config:
sudo mkdir -p /var/run/php-fpm
sudo vi /etc/php-fpm.d/www.conf
listen = /run/php-fpm/www.sock update this line with expected directory. It should be listen = /var/run/php-fpm/default.sockConfigure nginx
sudo vi /etc/nginx/nginx.conf
8093Configure php with nginx
sudo vi /etc/nginx/default.d/php.conf
fastcgi_pass php-fpm; to this: fastcgi_pass unix:/var/run/php-fpm/default.sock;Restart php-fpm and nginx
sudo systemctl enable --now nginx
sudo systemctl enable --now php-fpm
Test: curl http://stapp01:8093/index.php