我正在尝试为我的网站安装 Roundcube。它位于我的托管服务器上,我目前正在遵循本教程:
https://www.linuxbabe.com/mail-server/install-roundcube-webmail-ubuntu-16-04-nginx-mariadb-php7
我已经完成了第 4 步,使用 TTLS。当我转到第 5 步,尝试访问时,mail.stackexchange.com/installer
遇到了 Nginx 404 错误。
我做错了什么?我花了不少时间才弄清楚,所以我希望有人能帮我!这是我第一次使用 Nginx 而不是 Apache2
服务器
Ubuntu 16.0.4 运行 Nginx 和 Gunicorn 来运行 django 应用程序。我的 Roundcube 安装目录是 /usr/share/nginx/roundcubemail
Roundcube 配置
server {
listen 80;
server_name mail.your-domain.com;
return 301 https://mail.your-domain.com/$request_uri;
}
server {
listen 443 ssl http2;
server_name mail.your-domain.com;
root /usr/share/nginx/roundcubemail/;
index index.php index.html index.htm;
ssl_certificate /etc/letsencrypt/live/mail.your-domain.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/mail.your-domain.com/privkey.pem;
ssl_session_timeout 1d;
ssl_session_cache shared:SSL:10m;
ssl_session_tickets off;
ssl_protocols TLSv1.1 TLSv1.2;
ssl_ciphers 'ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!3DES:!MD5:!PSK';
ssl_prefer_server_ciphers on;
error_log /var/log/nginx/roundcube.error;
access_log /var/log/nginx/roundcube.access;
location = /50x.html {
root /usr/share/nginx/html;
}
location / {
try_files $uri $uri/ /index.php;
}
error_page 404 /404.html;
error_page 500 502 503 504 /50x.html;
location ~ ^/(README|INSTALL|LICENSE|CHANGELOG|UPGRADING)$ {
deny all;
}
location ~ ^/(bin|SQL)/ {
deny all;
}
location ~ \.php$ {
try_files $uri =404;
fastcgi_pass unix:/run/php/php7.0-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
location ~ /.well-known/acme-challenge {
allow all;
}
}
编辑
501
这与作为我的所有 Roundcube 文件的所有者和admin
组(logs
&除外)有什么关系吗temp
?
答案1
与我的 Roundcube 日志相关的错误是因为php7.0-fpm
没有安装!一旦我安装了它,一切都正常了。