After resolving LNMP build a good environment, the emergence of Access Denied error

Set LNMP environment, Access Denied error occurred, is now ruled out file permissions problems are ruled out is the Nginx issue, but PHP problems could not be resolved.
Found lot of Daniel by Nginx log to troubleshoot the error, open nginx.conf found that my log information is not detailed enough, and hope to be able to configure log_format
Configure Nginx log_format
①the nginx.conf
Putting the log_format line deleted, replace with this part
log_format main ‘$remote_addr – $remote_user [$time_local] ‘
‘fwf[$http_x_forwarded_for] tip[$http_true_client_ip] ‘
‘$upstream_addr $upstream_response_time $request_time ‘
‘$geoip_country_code ‘
‘$http_host $request ‘
‘”$status” $body_bytes_sent “$http_referer” ‘
‘”$http_accept_language” “$http_user_agent” ‘
③ Save and exit
Restart nginx
Open the nginx log file, find the error.log, and error.log, found the following errors
From can be found in the first row are PHP errors, search problems found is because PHP restricted directories that PHP can only run, now only runs under the/tmp/folder, so he can’t in the nginx runs under the www-root folder, so an access denied error occurred
① Open the PHP.ini file
II find open_basedir
③ the line commented out, which is commented out PHP can be run in any folder, if you want to run under a specified folder, open_basedir is set to the appropriate directory
Black-save and exit
Restart the PHP-FPM service PHP-fpm restart
Then visit a page and found that solves the problem.