我正在处理子目录。我想让“babylon/webmail”进入我的rainloop webmail 客户端。
location ^~ /webmail {
root /srv/rainloop/public_html;
try_files $uri $uri/ /webmail/index.php?$query_string;
access_log /srv/rainloop/logs/access.log;
error_log /srv/rainloop/logs/error.log;
index index.php;
access_log /var/log/nginx/scripts.log scripts;
location ~ \.php$ {
#fastcgi_index index.php;
#fastcgi_split_path_info ^(.+\.php)(.*)$;
#fastcgi_keep_conn on;
#include /etc/nginx/fastcgi_params;
#fastcgi_pass unix:/var/run/php5-fpm.sock;
#fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
#try_files $uri =404;
include fastcgi_params;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
#fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param SCRIPT_FILENAME /srv/rainloop/public_html/index.php;
#include fastcgi_params;
}
location ~ /\.ht {
deny all;
}
location ^~ /webmail/data {
deny all;
}
}
然而这
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
根本不起作用。它打印出:/srv/rainloop/public_html/webmail/index.php;该文件在目录结构中不存在,但是:/srv/rainloop/public_html/index.php
fastcgi_param SCRIPT_FILENAME /srv/rainloop/public_html/index.php;
PS:硬编码后,我根本没有收到任何错误,但是页面是空白的,有一些rainloop代码源代码。