Quando provo ad aprire index.php browser vedo l'errore:PHP-FPM: Operation not permitted
No input file specified.
In error.log:
2013/11/04 22:40: 07 [errore] 3435 # 0: * 4 FastCGI inviato in stderr: "Impossibile aprire lo script principale: /var/www/index.php (Operazione non consentita)" durante la lettura dell'intestazione della risposta da upstream, client: 10.0.2.2, server : localhost, richiesta: "GET/HTTP/1.1", a monte: "fastcgi: //127.0.0.1: 9000", host: "localhost"
Configurazione del server:
- CentOS 6.4
- PHP 5.4.17 (installato da fonti)
- Nginx 1.0.15
PHP-FPM lavora da nginx utente.
$ ps aux | grep fpm
root 3460 0.0 0.7 29524 3428 ? Ss 22:48 0:00 php-fpm: master process (/usr/etc/php-fpm.conf)
nginx 3462 0.0 0.5 29524 2732 ? S 22:48 0:00 php-fpm: pool www
nginx 3463 0.0 0.5 29524 2732 ? S 22:48 0:00 php-fpm: pool www
nginx 3464 0.0 0.7 29524 3592 ? S 22:48 0:00 php-fpm: pool www
nginx 3465 0.0 0.5 29524 2732 ? S 22:48 0:00 php-fpm: pool www
nginx 3466 0.0 0.5 29524 2732 ? S 22:48 0:00 php-fpm: pool www
vagrant 3468 0.0 0.1 5532 720 pts/0 D+ 22:48 0:00 grep fpm
$ ls -la /var/www
drwxr-xr-x 2 nginx nginx 4096 Ноя 4 22:34 .
drwxr-xr-x. 19 root root 4096 Ноя 4 22:31 ..
-rw-r--r-- 1 nginx nginx 17 Ноя 4 22:34 index.php
Accendere catch_workers_output non aiuta
Non hai 'x' privilegio per index.php, 'x' significa esecuzione. Dovrebbe essere 'rwxr-xr-x' – TroyCheng
Non ho mai aggiunto il privilegio 'x' per i file php, che funzionano via web-server, e non ci sono stati problemi. Ma ho provato ad aggiungere il privilegio 'x' per index.php ora - che non mi ha aiutato per me – vanchester
Ok, 'Operazione non consentita' è assolutamente un problema di autorità. Nell'ambiente del prodotto, dovrebbe essere meglio utilizzare un account di lavoro personalizzato per distribuire sia nginx che php. Qui mi accorgo che stai usando 'root' per avviare php-fpm e il processo di lavoro che effettivamente funziona con l'account 'nginx'. E 'impossibile accedere a'/var 'dall'account' nginx '. – TroyCheng