save.
edit /usr/local/etc/nginx/nginx.conf
Find this lines in nginx.conf and adjust :
root /usr/local/www/nginx;
location / {
index index.php index.html index.htm;
}
location ~ .php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /usr/local/www/nginx$fastcgi_script_name;
include fastcgi_params;
}
Edit /usr/local/etc/php-fpm.conf
Find these lines :
nobody –>
nobody –>
change nobody into www (or your www user)
www
www
Run the services
# /usr/local/etc/rc.d/php-fpm start
# /usr/local/etc/rc.d/nginx start
5. Testing
# cd /usr/local/www/nginx
# nano info.php
save.
done.
Compatible with Apache’s log file format
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
FROM HERE