1 (edited by guyueland 2017-03-28 08:09:14)

Topic: 404 not found

==== Required information ====
- iRedMail version (0.9.6):
- Linux/BSD distribution name and version:  CentOS release 6.8
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL
- Web server (Apache or Nginx): Nginx
- Manage mail accounts with iRedAdmin-Pro? No
- Related log if you're reporting an issue: /var/log/nginx/error.log

Yesterday, I added SSL certificates to the server no problem using LetsEncrypt.  I was able to log in to the server and it would display the mail log in https://mail.eliteautogroup.ca/mail

This afternoon, i tried to go to the webmail, first it gave me the default nginx web page, say it works, etc... then it gave me a 404 not found.  I tried going to the iredadmin panel, same thing, 404 not found.

Can you help, as this is a production server.

By the way, Should the epel repo be enabled?

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: 404 not found

While requesting letsencrypt cert, did you ask 'certbot' program to modify your Nginx config files?

Please go to /etc/nginx/ directory, find the config files modified by certbot (files with '-le' in name), rename them to disable them (e.g. xx.bak). Then follow our tutorial to use letsencrypt cert:
http://www.iredmail.org/docs/use.a.boug … icate.html

3 (edited by guyueland 2017-03-28 11:50:53)

Re: 404 not found

I did follow your tutorial to use letsencrypt.  There are no xx.bak files.

This is the command I ran certbot with:

./certbot-auto certonly --webroot -w /var/www/html -d mail.domain.ca

4

Re: 404 not found

guyueland wrote:

There are no xx.bak files.

I mean you rename the config files modified by Letsencrypt to "xxx.bak", this way Nginx won't include these (.bak) files.

iRedMail uses /etc/nginx/conf.d/00-default.conf by default, you can setup ssl configuration in this file. If you have other web sites, please update them too.

5

Re: 404 not found

There are no files with -le in them

6 (edited by guyueland 2017-03-28 09:42:37)

Re: 404 not found

This is my 00-default.conf

# HTTP
server {
    # Listen on ipv4
    listen 80;
    # Listen on ipv6.
    # Note: this setting listens on both ipv4 and ipv6 with Nginx release
    #       shipped in some Linux/BSD distributions.
    #listen [::]:80;
    server_name _;

    root /var/www/html;
    index index.php index.html;

    location / {
        root /var/www/html;
    }

    include /etc/nginx/templates/php-catchall.tmpl;
    include /etc/nginx/templates/redirect_to_https.tmpl;
    include /etc/nginx/templates/misc.tmpl;
}

# HTTPS
server {
    listen 443;
    server_name _;

    ssl on;
    ssl_certificate  /etc/letsencrypt/live/mail.domain.com/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/mail.domain.com/privkey.pem;
    ssl_protocols TLSv1 TLSv1.1 TLSv1.2;

    # Fix 'The Logjam Attack'.
    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:ECDHE-RSA-DES-CBC3-SHA:ECDHE-ECDSA-DES-CBC3-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:AES:CAMELLIA:DES-CBC3-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!aECDH:!EDH-DSS-DES-CBC3-SHA:!EDH-RSA-DES-CBC3-SHA:!KRB5-DES-CBC3-SHA;
    ssl_prefer_server_ciphers on;
    ssl_dhparam /etc/nginx/ssl/dhparams.pem;

    index index.php index.html;

    location / {
        root /var/www/html;
    }

    # HTTP Strict Transport Security (HSTS)
    #include /etc/nginx/templates/hsts.tmpl;

    # Web applications.
    include /etc/nginx/templates/roundcube.tmpl;
    include /etc/nginx/templates/iredadmin.tmpl;
    include /etc/nginx/templates/sogo.tmpl;

    # PHP applications. WARNING: php-catchall.tmpl should be loaded after
    # other php web applications.
    include /etc/nginx/templates/php-catchall.tmpl;

    include /etc/nginx/templates/misc.tmpl;

7 (edited by guyueland 2017-03-28 09:43:06)

Re: 404 not found

My ssl.conf

#
# HTTPS server configuration
#
#
#server {
#    listen       443 ssl http2 default_server;
#    listen       [::]:443 ssl;
#    server_name  _;
#    root         /usr/share/nginx/html;
#
# SSL configuration
#listen 443 ssl default_server;

# certs sent to the client in SERVER HELLO are concatenated in ssl_certificate
ssl_certificate /etc/letsencrypt/live/mail.domain.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/mail.domain.com/privkey.pem;
ssl_session_timeout 1d;

ssl_session_cache shared:SSL:32m;
ssl_session_tickets off;

# Diffie-Hellman parameter for DHE ciphersuites, recommended 2048 bits
ssl_dhparam /etc/nginx/ssl/dhparams.pem;

# intermediate configuration. tweak to your needs.
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_prefer_server_ciphers on;
ssl_ciphers 'ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256';


# HSTS (ngx_http_headers_module is required) (15768000 seconds = 6 months)
add_header Strict-Transport-Security "max-age=31557600; includeSubDomains";

# OCSP Stapling ---
# fetch OCSP records from URL in ssl_certificate and cache them
#ssl_stapling on;
#ssl_stapling_verify on;

## verify chain of trust of OCSP response using Root CA and Intermediate certs
#ssl_trusted_certificate /etc/letsencrypt/live/mail.eliteautogroup.ca/fullchain.pem

ssl_buffer_size 800k;

#
    # Load configuration files for the default server block.
#    include /etc/nginx/default.d/*.conf;
#     include /etc/nginx/templates/adminer.tmpl;
#
#    location / {
#    }
#    error_page 404 /404.html;
#        location = /40x.html {
#    }
#
#    error_page 500 502 503 504 /50x.html;
#        location = /50x.html {
#    }
#}

There were no changes to the files except for changing the path of the SSL certificates.

8

Re: 404 not found

Could you please show us the full command you used to request letsencrypt cert?

guyueland wrote:

This afternoon, i tried to go to the webmail, first it gave me the default nginx web page, say it works, etc... then it gave me a 404 not found.  I tried going to the iredadmin panel, same thing, 404 not found.

Could you please check all files under /etc/nginx/conf.d? Show us output of commands please:

ls -l /etc/nginx/conf.d/

You can also copy all contents in /etc/nginx/conf.d/*.conf, just replace the sensitive info, like domain name, by 'example.com' or whatever.

9

Re: 404 not found

Besides update Nginx config file to enable ssl cert, did you change any other settings to Nginx? or add some new config files?

10

Re: 404 not found

Why does iredmail redirect to mail.eliteautogroup.ca/mail?  I looked at the html code in /var/www/html/index.html and it references <meta HTTP-EQUIV="REFRESH" content="0; url=/mail/">  but there is no symlink mail in the folder or the /var/www folder that points to roundcubemail . ???

11

Re: 404 not found

Output of ls -l /etc/nginx/conf.d/*.conf

-rw-r--r--. 1 root root 2217 Mar 27 18:00 00-default.conf
-rw-r--r--. 1 root root  504 Mar 27 18:01 default.conf
-rw-r--r--. 1 root root 1888 Mar 23 17:52 ssl.conf
-rw-r--r--. 1 root root  283 Oct 31 07:37 virtual.conf

12

Re: 404 not found

The contents of default.conf

#
# The default server
#

server {
    listen       80 default_server;
    listen       [::]:80 default_server;
#    server_name  _;
    root         /var/www/html;

    # Load configuration files for the default server block.
    include /etc/nginx/default.d/*.conf;

    location / {
    }

    error_page 404 /404.html;
        location = /40x.html {
    }

    error_page 500 502 503 504 /50x.html;
        location = /50x.html {
    }
#Web applications
include /etc/nginx/templates/adminer.tmpl;
}

13

Re: 404 not found

The contents of virtual.conf

#
# A virtual host using mix of IP-, name-, and port-based configuration
#

#server {
#    listen       8000;
#    listen       somename:8080;
#    server_name  somename  alias  another.alias;

#    location / {
#        root   html;
#        index  index.html index.htm;
#    }
#}

14

Re: 404 not found

No, I didn't do anything but what your tutorial said to do.  No additional files.

15

Re: 404 not found

Here are results of tail -n40 /var/log/nginx/error.log

2017/03/27 18:40:36 [error] 25441#0: *4 open() "/var/www/roundcubemail" failed (13: Permission denied), client: 216.36.162.155, server: _, request: "GET /mail HTTP/1.1", host: "mail.domain.com", referrer: "http://www.iredmail.org/forum/post55358.html"
2017/03/27 18:40:36 [error] 25441#0: *4 open() "/var/www/html/favicon.ico" failed (2: No such file or directory), client: 216.36.162.155, server: _, request: "GET /favicon.ico HTTP/1.1", host: "mail.domain.com"
2017/03/27 18:40:37 [error] 25441#0: *4 open() "/var/www/html/favicon.ico" failed (2: No such file or directory), client: 216.36.162.155, server: _, request: "GET /favicon.ico HTTP/1.1", host: "mail.domain.com"
2017/03/27 18:41:41 [error] 25441#0: *4 open() "/var/www/roundcubemail" failed (13: Permission denied), client: 216.36.162.155, server: _, request: "GET /mail HTTP/1.1", host: "mail.domain.com", referrer: "http://www.iredmail.org/forum/post55358.html"
2017/03/27 18:42:09 [error] 25834#0: *1 "/var/www/html/iredadmin/index.html" is not found (2: No such file or directory), client: 216.36.162.155, server: , request: "GET /iredadmin/ HTTP/1.1", host: "mail.domain.com"
2017/03/27 18:42:09 [error] 25834#0: *1 open() "/var/www/html/404.html" failed (2: No such file or directory), client: 216.36.162.155, server: , request: "GET /iredadmin/ HTTP/1.1", host: "mail.domain.com"
2017/03/27 18:42:19 [error] 25834#0: *1 "/var/www/html/mail/index.html" is not found (2: No such file or directory), client: 216.36.162.155, server: , request: "GET /mail/ HTTP/1.1", host: "mail.domain.com"
2017/03/27 18:42:19 [error] 25834#0: *1 open() "/var/www/html/404.html" failed (2: No such file or directory), client: 216.36.162.155, server: , request: "GET /mail/ HTTP/1.1", host: "mail.domain.com"
2017/03/27 18:53:31 [error] 25834#0: *3 open() "/var/www/roundcubemail" failed (13: Permission denied), client: 52.1.11.160, server: _, request: "GET /mail HTTP/1.1", host: "mail.domain.com"
2017/03/27 19:48:54 [error] 25834#0: *4 "/var/www/html/mail/index.html" is not found (2: No such file or directory), client: 216.36.162.155, server: , request: "GET /mail/ HTTP/1.1", host: "mail.domain.com"
2017/03/27 19:48:54 [error] 25834#0: *4 open() "/var/www/html/404.html" failed (2: No such file or directory), client: 216.36.162.155, server: , request: "GET /mail/ HTTP/1.1", host: "mail.domain.com"
2017/03/27 19:48:55 [error] 25834#0: *4 "/var/www/html/mail/index.html" is not found (2: No such file or directory), client: 216.36.162.155, server: , request: "GET /mail/ HTTP/1.1", host: "mail.domain.com"
2017/03/27 19:48:55 [error] 25834#0: *4 open() "/var/www/html/404.html" failed (2: No such file or directory), client: 216.36.162.155, server: , request: "GET /mail/ HTTP/1.1", host: "mail.domain.com"
2017/03/27 20:20:39 [error] 6854#0: *1 open() "/var/www/html/favicon.ico" failed (2: No such file or directory), client: 216.36.162.155, server: , request: "GET /favicon.ico HTTP/1.1", host: "mail.domain.com"
2017/03/27 20:20:39 [error] 6854#0: *1 open() "/var/www/html/404.html" failed (2: No such file or directory), client: 216.36.162.155, server: , request: "GET /favicon.ico HTTP/1.1", host: "mail.domain.com"
2017/03/27 20:20:39 [error] 6854#0: *3 open() "/var/www/html/favicon.ico" failed (2: No such file or directory), client: 216.36.162.155, server: , request: "GET /favicon.ico HTTP/1.1", host: "mail.domain.com"
2017/03/27 20:20:39 [error] 6854#0: *3 open() "/var/www/html/404.html" failed (2: No such file or directory), client: 216.36.162.155, server: , request: "GET /favicon.ico HTTP/1.1", host: "mail.domain.com"
2017/03/27 20:20:39 [error] 6854#0: *2 "/var/www/html/mail/index.html" is not found (2: No such file or directory), client: 216.36.162.155, server: , request: "GET /mail/ HTTP/1.1", host: "mail.domain.com"
2017/03/27 20:20:39 [error] 6854#0: *2 open() "/var/www/html/404.html" failed (2: No such file or directory), client: 216.36.162.155, server: , request: "GET /mail/ HTTP/1.1", host: "mail.domain.com"
2017/03/27 20:20:39 [error] 6854#0: *2 open() "/var/www/html/favicon.ico" failed (2: No such file or directory), client: 216.36.162.155, server: , request: "GET /favicon.ico HTTP/1.1", host: "mail.domain.com"
2017/03/27 20:20:39 [error] 6854#0: *2 open() "/var/www/html/404.html" failed (2: No such file or directory), client: 216.36.162.155, server: , request: "GET /favicon.ico HTTP/1.1", host: "mail.domain.com"
2017/03/27 20:20:39 [error] 6854#0: *3 open() "/var/www/html/favicon.ico" failed (2: No such file or directory), client: 216.36.162.155, server: , request: "GET /favicon.ico HTTP/1.1", host: "mail.domain.com"
2017/03/27 20:20:39 [error] 6854#0: *3 open() "/var/www/html/404.html" failed (2: No such file or directory), client: 216.36.162.155, server: , request: "GET /favicon.ico HTTP/1.1", host: "mail.domain.com"
2017/03/27 20:22:52 [error] 6854#0: *5 open() "/var/www/roundcubemail" failed (13: Permission denied), client: 216.36.162.155, server: _, request: "GET /mail HTTP/1.1", host: "mail.domain.com", referrer: "http://www.iredmail.org/forum/topic1253 … found.html"
2017/03/27 20:22:53 [error] 6854#0: *5 open() "/var/www/html/favicon.ico" failed (2: No such file or directory), client: 216.36.162.155, server: _, request: "GET /favicon.ico HTTP/1.1", host: "mail.domain.com"
2017/03/27 20:22:53 [error] 6854#0: *5 open() "/var/www/html/favicon.ico" failed (2: No such file or directory), client: 216.36.162.155, server: _, request: "GET /favicon.ico HTTP/1.1", host: "mail.domain.com"
2017/03/27 20:23:08 [error] 6854#0: *7 "/var/www/html/mail/index.html" is not found (2: No such file or directory), client: 216.36.162.155, server: , request: "GET /mail/ HTTP/1.1", host: "mail.domain.com"
2017/03/27 20:23:08 [error] 6854#0: *7 open() "/var/www/html/404.html" failed (2: No such file or directory), client: 216.36.162.155, server: , request: "GET /mail/ HTTP/1.1", host: "mail.domain.com"
2017/03/27 20:23:16 [error] 6854#0: *7 "/var/www/html/mail/index.html" is not found (2: No such file or directory), client: 216.36.162.155, server: , request: "GET /mail/ HTTP/1.1", host: "mail.domain.com"
2017/03/27 20:23:16 [error] 6854#0: *7 open() "/var/www/html/404.html" failed (2: No such file or directory), client: 216.36.162.155, server: , request: "GET /mail/ HTTP/1.1", host: "mail.domain.com"
2017/03/27 21:44:35 [error] 6854#0: *12 "/var/www/html/mail/index.html" is not found (2: No such file or directory), client: 216.36.162.155, server: , request: "GET /mail/ HTTP/1.1", host: "mail.domain.com"
2017/03/27 21:44:35 [error] 6854#0: *12 open() "/var/www/html/404.html" failed (2: No such file or directory), client: 216.36.162.155, server: , request: "GET /mail/ HTTP/1.1", host: "mail.domain.com"
2017/03/27 21:44:40 [error] 6854#0: *12 "/var/www/html/mail/index.html" is not found (2: No such file or directory), client: 216.36.162.155, server: , request: "GET /mail/ HTTP/1.1", host: "mail.domain.com"
2017/03/27 21:44:40 [error] 6854#0: *12 open() "/var/www/html/404.html" failed (2: No such file or directory), client: 216.36.162.155, server: , request: "GET /mail/ HTTP/1.1", host: "mail.domain.com"
2017/03/27 21:49:01 [error] 8661#0: *1 "/var/www/html/mail/index.html" is not found (2: No such file or directory), client: 216.36.162.155, server: , request: "GET /mail/ HTTP/1.1", host: "mail.domain.com"
2017/03/27 21:49:01 [error] 8661#0: *1 open() "/var/www/html/404.html" failed (2: No such file or directory), client: 216.36.162.155, server: , request: "GET /mail/ HTTP/1.1", host: "mail.domain.com"
2017/03/27 21:49:02 [error] 8661#0: *1 "/var/www/html/mail/index.html" is not found (2: No such file or directory), client: 216.36.162.155, server: , request: "GET /mail/ HTTP/1.1", host: "mail.domain.com"
2017/03/27 21:49:02 [error] 8661#0: *1 open() "/var/www/html/404.html" failed (2: No such file or directory), client: 216.36.162.155, server: , request: "GET /mail/ HTTP/1.1", host: "mail.domain.com"
2017/03/27 21:49:07 [error] 8661#0: *1 "/var/www/html/mail/index.html" is not found (2: No such file or directory), client: 216.36.162.155, server: , request: "GET /mail/ HTTP/1.1", host: "mail.domain.com"
2017/03/27 21:49:07 [error] 8661#0: *1 open() "/var/www/html/404.html" failed (2: No such file or directory), client: 216.36.162.155, server: , request: "GET /mail/ HTTP/1.1", host: "mail.domain.com"

16

Re: 404 not found

guyueland wrote:

Output of ls -l /etc/nginx/conf.d/*.conf
-rw-r--r--. 1 root root 2217 Mar 27 18:00 00-default.conf
-rw-r--r--. 1 root root  504 Mar 27 18:01 default.conf
-rw-r--r--. 1 root root 1888 Mar 23 17:52 ssl.conf
-rw-r--r--. 1 root root  283 Oct 31 07:37 virtual.conf

iRedMail generates only one file - 00-default.conf, maybe you should move other 3 files to another directory for backup, then just use '00-default.conf' for debugging purpose.

And obviously, 00-default.conf is almost same as default.conf.

17

Re: 404 not found

Here are the contents of /var/www/

drwxr-xr-x. 10 root      root      4096 Mar 27 22:29 .
drwxr-xr-x. 22 root      root      4096 Jan  7 14:07 ..
drwxr-xr-x.  2 root      root      4096 Jan 12 11:07 cgi-bin
drwxr-xr-x.  3 root      root      4096 Feb 14 11:38 error
drwxr-xr-x.  3 root      root      4096 Mar 27 18:41 html
drwxr-xr-x.  3 root      root      4096 Feb 14 11:38 icons
lrwxrwxrwx   1 root      root        13 Mar 24 21:30 iredadmin -> iRedAdmin-0.7
dr-xr-xr-x.  9 iredadmin iredadmin 4096 Jan  8 02:01 iRedAdmin-0.6.3
dr-xr-xr-x  10 iredadmin iredadmin 4096 Mar 24 22:01 iRedAdmin-0.7
lrwxrwxrwx.  1 root      root        28 Jan  7 14:08 roundcubemail -> /var/www/roundcubemail-1.2.0
drwx------. 13 root      root      4096 Mar 24 21:40 roundcubemail-1.2.0
drwxr-xr-x  13 root      root      4096 Mar 10 10:41 roundcubemail-1.2.4


The contents of /var/www/html

-rw-r--r--.  1 root root   98 Mar 27 17:39 index.html
-rw-r--r--.  1 root root   26 Jan  7 14:08 robots.txt
drwxr-xr-x   2 root root 4096 Mar 23 11:16 .well-known

18

Re: 404 not found

I moved the other .conf files in /etc/nginx/conf.d to /etc/nginx/conf.d/backup, reloaded nginx and now it gets 403 forbidden.  Here is the results of tail -n20 /var/log/nginx/error.log:

2017/03/27 20:23:16 [error] 6854#0: *7 open() "/var/www/html/404.html" failed (2: No such file or directory), client: 216.36.162.155, server: , request: "GET /mail/ HTTP/1.1", host: "mail.domain.com"
2017/03/27 21:44:35 [error] 6854#0: *12 "/var/www/html/mail/index.html" is not found (2: No such file or directory), client: 216.36.162.155, server: , request: "GET /mail/ HTTP/1.1", host: "mail.domain.com"
2017/03/27 21:44:35 [error] 6854#0: *12 open() "/var/www/html/404.html" failed (2: No such file or directory), client: 216.36.162.155, server: , request: "GET /mail/ HTTP/1.1", host: "mail.domain.com"
2017/03/27 21:44:40 [error] 6854#0: *12 "/var/www/html/mail/index.html" is not found (2: No such file or directory), client: 216.36.162.155, server: , request: "GET /mail/ HTTP/1.1", host: "mail.domain.com"
2017/03/27 21:44:40 [error] 6854#0: *12 open() "/var/www/html/404.html" failed (2: No such file or directory), client: 216.36.162.155, server: , request: "GET /mail/ HTTP/1.1", host: "mail.domain.com"
2017/03/27 21:49:01 [error] 8661#0: *1 "/var/www/html/mail/index.html" is not found (2: No such file or directory), client: 216.36.162.155, server: , request: "GET /mail/ HTTP/1.1", host: "mail.domain.com"
2017/03/27 21:49:01 [error] 8661#0: *1 open() "/var/www/html/404.html" failed (2: No such file or directory), client: 216.36.162.155, server: , request: "GET /mail/ HTTP/1.1", host: "mail.domain.com"
2017/03/27 21:49:02 [error] 8661#0: *1 "/var/www/html/mail/index.html" is not found (2: No such file or directory), client: 216.36.162.155, server: , request: "GET /mail/ HTTP/1.1", host: "mail.domain.com"
2017/03/27 21:49:02 [error] 8661#0: *1 open() "/var/www/html/404.html" failed (2: No such file or directory), client: 216.36.162.155, server: , request: "GET /mail/ HTTP/1.1", host: "mail.domain.com"
2017/03/27 21:49:07 [error] 8661#0: *1 "/var/www/html/mail/index.html" is not found (2: No such file or directory), client: 216.36.162.155, server: , request: "GET /mail/ HTTP/1.1", host: "mail.domain.com"
2017/03/27 21:49:07 [error] 8661#0: *1 open() "/var/www/html/404.html" failed (2: No such file or directory), client: 216.36.162.155, server: , request: "GET /mail/ HTTP/1.1", host: "mail.domain.com"
2017/03/27 22:21:29 [error] 8661#0: *3 "/var/www/html/mail/index.html" is not found (2: No such file or directory), client: 216.36.162.155, server: , request: "GET /mail/ HTTP/1.1", host: "mail.domain.com"
2017/03/27 22:21:29 [error] 8661#0: *3 open() "/var/www/html/404.html" failed (2: No such file or directory), client: 216.36.162.155, server: , request: "GET /mail/ HTTP/1.1", host: "mail.domain.com"
2017/03/27 22:21:31 [error] 8661#0: *3 "/var/www/html/mail/index.html" is not found (2: No such file or directory), client: 216.36.162.155, server: , request: "GET /mail/ HTTP/1.1", host: "mail.domain.com"
2017/03/27 22:21:31 [error] 8661#0: *3 open() "/var/www/html/404.html" failed (2: No such file or directory), client: 216.36.162.155, server: , request: "GET /mail/ HTTP/1.1", host: "mail.domain.com"
2017/03/27 22:21:32 [error] 8661#0: *3 "/var/www/html/mail/index.html" is not found (2: No such file or directory), client: 216.36.162.155, server: , request: "GET /mail/ HTTP/1.1", host: "mail.domain.com"
2017/03/27 22:21:32 [error] 8661#0: *3 open() "/var/www/html/404.html" failed (2: No such file or directory), client: 216.36.162.155, server: , request: "GET /mail/ HTTP/1.1", host: "mail.domain.com"
2017/03/27 22:38:14 [error] 9342#0: *2 "/var/www/roundcubemail/index.php" is forbidden (13: Permission denied), client: 216.36.162.155, server: _, request: "GET /mail/ HTTP/1.1", host: "mail.domain.com"
2017/03/27 22:40:28 [error] 9342#0: *3 "/var/www/roundcubemail/index.php" is forbidden (13: Permission denied), client: 216.36.162.155, server: _, request: "GET /mail/ HTTP/1.1", host: "mail.domain.com"
2017/03/27 22:40:29 [error] 9342#0: *3 "/var/www/roundcubemail/index.php" is forbidden (13: Permission denied), client: 216.36.162.155, server: _, request: "GET /mail/ HTTP/1.1", host: "mail.domain.com"

19

Re: 404 not found

guyueland wrote:

2017/03/27 22:40:29 [error] 9342#0: *3 "/var/www/roundcubemail/index.php" is forbidden (13: Permission denied), client: 216.36.162.155, server: _, request: "GET /mail/ HTTP/1.1", host: "mail.domain.com"

Seems you have wrong file owner or permission on directory /var/www/roundcubemail.

guyueland wrote:

lrwxrwxrwx.  1 root      root        28 Jan  7 14:08 roundcubemail -> /var/www/roundcubemail-1.2.0
drwx------. 13 root      root      4096 Mar 24 21:40 roundcubemail-1.2.0

It links to /var/www/roundcubemail-1.2.0, but it's owned by root:root (this is correct) with permission 0700.

The permission should be 0755, and file /var/www/roundcubemail/config/config.inc.php must be owned by nginx:nginx with permission 0400.

Directories /var/www/roundcubemail/temp and 'logs' must be owned by nginx:nginx with permission 0700.

20

Re: 404 not found

Thanks, changing the permissions worked the charm!  I don't know what happened but something changed the permissions in that directory.