我在一台ubuntu电脑上用php-cgi运行nginx。事情似乎运行得很好,除了访问/的主要细节从nginx中产生了"403禁止“。访问/index.php运行得很好。如果我添加index.html并转到/,也可以。
server {
root /home/ajcrites/projects/php/devays/public/;
server_name sub.localhost;
location ~ \.php$ {
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
include fastcgi_params;
}
}看起来fastcgi_index index.php;会涵盖这一点,但事实显然并非如此。要让/为/index.php提供服务,我需要添加什么吗
发布于 2013-04-07 00:29:47
您需要将index.php添加到索引指令中,以便获得类似于index index.html index.php;的内容
https://stackoverflow.com/questions/15824612
复制相似问题