Let’s go to the previous structural diagram.
Then the current situation is visitingLocal 8080 port
To visitPort 80 of tengine container
http://x.x.x.x:8080/index.html
Can be accessed normally
http://x.x.x.x:8080/index.phpPhpfpm container
Show log:
172.17.0.3 - 12/Nov/2015:08:57:00 +0000 "GET /index.php" 404
172.17.0.3 - 12/Nov/2015:08:57:00 +0000 "GET /index.php" 404
172.17.0.3 - 12/Nov/2015:08:57:00 +0000 "GET /index.php" 404
Display 404. Unable to access the page, then I think it may be a permission issue.
[EnterTengine container
】
[EnterPhpfpm container
】
I used it directlyphp:5.5.30-fpm
The image of thePhpfpm container
Run upPhpfpm container
The/usr/local/etc/php-fpm.conf
I read the documents
user = www-data
group = www-data
Here comes the key question:
I am herePhpfpm container
usefulchown -R www-data:www-data /data/sites
After the order,/data/sites
The owner of all the files below is still staff.
1. Why can’t I change the owner of the volume lock hanging in the directory? When I need to build images, I need to change the permissions and then mount it?
2、staff
What the hell is this?
Volume’s permissions depend on how the host is given, if you want to
phpfpm
Folderwww-data:www-data
Permission to execute in your host mount directorychown -R www-data:www-data /data/sites
Just.