Build LNMP environment, put a WordPress station system
The LNMP environment was soon built, but there were some problems when I put WordPress on.
The main problem:
1. The first is that Wp-content/uploads does not have permission to create,
This is a manual creation, give a 777 permission to just fine.
2. The uploaded file cannot be moved to Wp-content/uploads.
This is a major problem, but also a more troublesome problem, Baidu's answer is the same set of 777 permissions, not the Chinese user name,
Not a bit of use.
First describe the background before you get a solution
Install LNMP environment when all is installed with the root user, but when I put the program is a new creation of a morequ user, the program all put to this user, and then use Nginx Proxy.
There is a permissions issue.
Turned over Baidu, a little useless, and finally a Bing search to get an answer.
Original address: http://www.aspku.com/cms/wordpress/55720.html
In accordance with his method after the change, even HTTP is not enough, directly 500, after many efforts to finally get the answer.
A) Modify nginx.conf
At the very beginning of this file, there is a setting for user, modified to:
user root root;worker_processes 1;
b) Modify php-fpm.conf
In this file you see this sentence:
; Include one or more files. If Glob (3) exists, it is used to include a bunch of; files from a glob (in the ; file.include=/et C/PHP-FPM.D/*. conf
can go into this folder to see that there is a www.conf file
To modify this file:
; Set Permissions forUNIX sockets,ifOne is used. In Linux, Read/write; Permissions must be setinchorder to allow connections from a Web server. many; BSD-derived systems allow connections regardless of permissions.; Default Values:user and group are set as the running user; Mode is set to0666; Listen.owner=Morequ;listen.group=Morequ;listen.mode= 0666; Unix User/group of processes; Note:the user is mandatory. If The group is not set, thedefaultUsers Group; would be used.; Rpm:apache choosed to being able to access some dir as Httpduser = morequ; Rpm:keep a group allowed to write in log Dir.group = Morequ
Change the original WWW user to my current user.
The results were successful.
Solve the upload file cannot be moved to Wp-content/uploads in WordPress