gpt4 book ai didi

mysql - Nginx Php5-fpm 配置在 Maverisks 上不起作用

转载 作者:行者123 更新时间:2023-11-29 23:45:58 24 4
gpt4 key购买 nike

我遇到了 nginx 的问题,花了我一整天的时间。我尝试了在互联网上找到的许多解决方案,但没有成功。我通过homebrew在MAC上安装了nginx、mysql、php-fpm。安装非常简单。除了一件事之外,一切都按预期进行。当我每次尝试访问我的网站时,它都会返回 404。

这里是日志、nginx 配置、文件系统结构和权限。

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;
}

}

http://i.stack.imgur.com/gsuQt.png

http://i.stack.imgur.com/XKWAQ.png

有人解决过这样的问题吗?请帮助我。

最佳答案

我以前遇到过这个问题,正如日志已经说过的那样,这是一个权限问题。您必须确保网站根目录下的每个文件夹都具有执行权限。

您可以使用chmod +x/path来做到这一点

关于mysql - Nginx Php5-fpm 配置在 Maverisks 上不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25949264/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com