Install and Configure PHP-FPM (Nginx version)

Hello good afternoon,

I had several attempts with this exercise and even with the APP working as expected with the required php-fpm version it still says it isn’t running or the version is incorrect.

How I installed php-fpm (ie: 7.0 as asked in one of my attempts):

Installed remi repo with: yum install http://rpms.remirepo.net/enterprise/remi-release-7.rpm
Installed php70-php-fpm

Did the rest as asked and the APP worked properly.

I think perhaps the check is specifically for “php-fpm” package and not “php70-php-fpm”, but I also tried in another attempt to change the default php-fpm package to the required version and still got the same error about php-fpm “not being installed or incorrect version”, so I don’t know what the problem might be, could it be a validation error or am I missing something?

Just as an extra note, I configured it to use 127.0.0.1:9000, not Unix socket, since the exercise asks this specifically, I’ve seen other people use a unix socket but perhaps there is another version I didn’t get.

Cheers

title says nginx but task asks to configure httpd with php-fpm

Hello,

Here is a copy/paste of the exercise, it asks for Nginx, I tried it again today and it failed, also see screenshoots please:

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:
 
 a. Install `nginx` on `app server 1` , configure it to use port `8092` and its document root should be `/var/www/html` .
 
 b. Install `php-fpm` version `7.0` on `app server 1` , it should listen on port `9000` .
 
 c. Configure php-fpm and nginx to work together.
 
 d. There is an `index.php` file on jump host at location `/tmp` that needs to be copied under the document root on the nginx server.
 
 e. Once configured correctly you can access the website usng `APP` button on the top bar.
 
 #### Failure Details:
 
 - either 'php-fpm' is not installed or its version is incorrect on App Server 1

The same problem everyone faced have loop kodekloud team @Inderpreet maybe he can help us

Its a valid error I believe, see the output of the curl command, its displaying the contents of the index.php as it is instead of executing it. As per the screenshot the contents should be just Welcome to xFusionCorp Industries ! instead of displaying all other of the content.

Hello @Inderpreet

When I used the “APP” button it displayed in the browser in plain text: Welcome to xFusionCorp Industries !

But if you say it should do the same with curl I’ll try again and let you know if I have better luck.

Thanks

Hello @Inderpreet are you sure curl can interpret PHP on CLI? I’ve been at it for a while but I could not find a way to make it work, and in the browser works fine.

@Inderpreet - curl and browser won’t be the same output. its validation issue in this task. please check

1 Like

@Inderpreet - Please check I tried again the same issue persists , php is running & version as per the requirement

https://kodekloud-engineer.com/#!/task_review?task_id=614610988bf6faf1b1bb948a

Seems like there was an HTML file as index.php so it was behaving weirdly. This is marked successful for you.

1 Like

Thank you for your assistance!

Cheers

My same issue.
https://kodekloud-engineer.com/#!/task_review?task_id=614cc40f4722aa3c111efcec
Please check for me.