php-fpm + bindfs 不工作
php-fpm + bindfs not working
我正在尝试使用 vagrant 设置我的本地网络服务器。我的 vagrant 共享文件夹在我的主文件夹 (~/home/vagrant/www) 中,我想使用 bindfs 将此文件夹安装在 /var/www.
中
这些是我的虚拟机的规格:
- Apache/2.4.23 (Ubuntu)
- PHP 7.0.12
- Ubuntu 14.04
我正在使用 php-fpm 来执行 php 脚本,但是在使用 bindfs 之后,我的网站总是 return 找不到文件。
这也是我的虚拟主机配置:
<VirtualHost *:80>
ServerName project1.dev
## Vhost docroot
DocumentRoot "/var/www/project1/public"
## Directories, there should at least be a declaration for /var/www/project1/public
<Directory "/var/www/project1/public">
Options Indexes FollowSymlinks MultiViews
AllowOverride All
Require all granted
<FilesMatch "\.php$">
Require all granted
SetHandler proxy:fcgi://127.0.0.1:9000
</FilesMatch>
</Directory>
## Logging
ErrorLog "/var/log/apache2/av_anhk5lpgjldb_error.log"
ServerSignature Off
CustomLog "/var/log/apache2/av_anhk5lpgjldb_access.log" combined
## Server aliases
ServerAlias www.project1.dev
## SetEnv/SetEnvIf for environment variables
SetEnv APP_ENV dev
SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=
## Custom fragment
</VirtualHost>
谁能帮帮我?
我设法在我的虚拟机中成功 运行 php-fpm + bindfs。我只是确保 运行ning php-fpm 和 apache 的用户是我在 bindfs 命令中设置的用户。我的 Apache 是 www-user
的 运行,所以我将命令更改为 sudo bindfs -o perms=0755,mirror-only=www-user,force-group=www-data,force-user=www-user /home/vagrant/www /var/www
并确保 Apache 也是 www-user
的 运行。
我正在尝试使用 vagrant 设置我的本地网络服务器。我的 vagrant 共享文件夹在我的主文件夹 (~/home/vagrant/www) 中,我想使用 bindfs 将此文件夹安装在 /var/www.
中这些是我的虚拟机的规格:
- Apache/2.4.23 (Ubuntu)
- PHP 7.0.12
- Ubuntu 14.04
我正在使用 php-fpm 来执行 php 脚本,但是在使用 bindfs 之后,我的网站总是 return 找不到文件。
这也是我的虚拟主机配置:
<VirtualHost *:80>
ServerName project1.dev
## Vhost docroot
DocumentRoot "/var/www/project1/public"
## Directories, there should at least be a declaration for /var/www/project1/public
<Directory "/var/www/project1/public">
Options Indexes FollowSymlinks MultiViews
AllowOverride All
Require all granted
<FilesMatch "\.php$">
Require all granted
SetHandler proxy:fcgi://127.0.0.1:9000
</FilesMatch>
</Directory>
## Logging
ErrorLog "/var/log/apache2/av_anhk5lpgjldb_error.log"
ServerSignature Off
CustomLog "/var/log/apache2/av_anhk5lpgjldb_access.log" combined
## Server aliases
ServerAlias www.project1.dev
## SetEnv/SetEnvIf for environment variables
SetEnv APP_ENV dev
SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=
## Custom fragment
</VirtualHost>
谁能帮帮我?
我设法在我的虚拟机中成功 运行 php-fpm + bindfs。我只是确保 运行ning php-fpm 和 apache 的用户是我在 bindfs 命令中设置的用户。我的 Apache 是 www-user
的 运行,所以我将命令更改为 sudo bindfs -o perms=0755,mirror-only=www-user,force-group=www-data,force-user=www-user /home/vagrant/www /var/www
并确保 Apache 也是 www-user
的 运行。