我已使用nginx根据this archlinux wiki配置了roundcubemail。
当我使用:https://mail.hackeac.com/webmail页面访问/webmail
时(在浏览器中)渲染:“未指定输入文件”,当我在{{ 1}}我看到了
/var/log/nginx/roundcubemail_error.log
Nginx配置:
2017/12/11 13:44:10 [error] 5827#5827: *1 "/usr/share/webapps/roundcubemailwebmail/index.html" is not found (2: No such file or directory), client: 169.255.184.153, server: mail.hackeac.com, request: "GET /webmail/ HTTP/2.0", host: "mail.hackeac.com"
2017/12/11 13:44:19 [error] 5827#5827: *1 "/usr/share/webapps/roundcubemailwebmail/index.html" is not found (2: No such file or directory), client: 169.255.184.153, server: mail.hackeac.com, request: "GET /webmail/ HTTP/2.0", host: "mail.hackeac.com"
或(更好的缩进)Here。
请帮忙。
答案 0 :(得分:2)
您使用fastcgi_param SCRIPT_FILENAME /usr/share/webapps/roundcubemail$fastcgi_script_name;
来计算脚本文件的路径。使用$request_filename
更简单,它使用root
和alias
指令计算正确的值。
例如:
location /webmail {
alias /usr/share/webapps/roundcubemail;
...
location ~ \.php$ {
include fastcgi.conf;
...
fastcgi_param SCRIPT_FILENAME $request_filename;
}
}
有关详细信息,请参阅this document。