次の設定ファイルを編集します。(コメントアウトを外して微調整します)
# vi /etc/php-fpm.d/www.conf
# ------------------------------------------------------
server {
・・・中略
; RPM: apache Choosed to be able to access some dir as httpd
user = nginx
; RPM: Keep a group allowed to write in log dir.
group = nginx
・・・中略
# vi /etc/nginx/conf.d/default.conf
# ------------------------------------------------------
server {
・・・中略
location / {
root /usr/share/nginx/html;
index index.html index.htm index.php;
}
・・・中略
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
location ~ \.php$ {
root /usr/share/nginx/html;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
#fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}