Mysql Nginx Php5 fpm配置不适用于Maverisk
我面临着nginx的问题,这花了我一整天的时间。我尝试了许多在互联网上找到的解决方案,但没有成功。 我通过自制在MAC上安装了nginx、mysql、php fpm。安装起来真的很容易。除一件事外,一切正常。每次我尝试访问我的网站时,它都返回404 以下是日志、nginx配置、文件系统结构和权限Mysql Nginx Php5 fpm配置不适用于Maverisk,mysql,nginx,php,Mysql,Nginx,Php,我面临着nginx的问题,这花了我一整天的时间。我尝试了许多在互联网上找到的解决方案,但没有成功。 我通过自制在MAC上安装了nginx、mysql、php fpm。安装起来真的很容易。除一件事外,一切正常。每次我尝试访问我的网站时,它都返回404 以下是日志、nginx配置、文件系统结构和权限 server { charset utf-8; client_max_body_size 128M; listen 80; ## listen for ipv4 #listen [::]:80 def
server {
charset utf-8;
client_max_body_size 128M;
listen 80; ## listen for ipv4
#listen [::]:80 default_server ipv6only=on; ## listen for ipv6
server_name emarketing.com www.emarketing.com;
root /Users/summernguyen/Documents/workspace/e-marketing/web;
index index.php;
access_log /Users/summernguyen/Documents/workspace/e-marketing/runtime/logs/access.log;
error_log /Users/summernguyen/Documents/workspace/e-marketing/runtime/logs/error.log debug;
location / {
# Redirect everything that isn't a real file to index.php
try_files $uri $uri/ /index.php?$args;
}
# uncomment to avoid processing of calls to non-existing static files by Yii
location ~ \.(js|css|png|jpg|gif|swf|ico|pdf|mov|fla|zip|rar)$ {
try_files $uri =404;
}
#error_page 404 /404.html;
location ~ \.php$ {
include fastcgi.conf;
fastcgi_pass 127.0.0.1:9000;
#fastcgi_pass unix:/var/run/php5-fpm.sock;
try_files $uri =404;
}
location ~ /\.(ht|svn|git) {
deny all;
}
}
有人解决过这种问题吗?请帮帮我。我以前遇到过这个问题,正如日志所说,这是一个权限问题。您必须确保网站根目录下的每个文件夹都具有执行权限
您可以使用chmod+x/path来实现这一点谢谢Tim,但是您可以看到每个文件夹在我的图片中都有正确的权限。我最终发现了问题,因为我在/Users/summernguyen的子文件夹中设置了根目录。这似乎不正确,我将其更改为/usr/local/var/www,并且它可以完美地运行到您的根路径/之后的用户/Users/summernguyen等等。但很好,你自己找到了解决办法。