1

Topic: iredmail problems

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): 0.9.8
- Deployed with iRedMail Easy or the downloadable installer? installer ( maybe )
- Linux/BSD distribution name and version: debian 7 wheezy
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): mysql
- Web server (Apache or Nginx): Nginx
- Manage mail accounts with iRedAdmin-Pro? No
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====
since upgrade iredadmin to version 0.9 nginx started to give errors on conneting to iredadmin :
2019/01/25 09:11:12 [error] 5348#0: *47990 open() "/var/www/iredadmin/static/default/css/screen.css" failed (2: No such file or directory)

Looks like Nginx cannot serve .css files correctly, but files and directories are present on the destination folder, what this problem can be?

BR
Stefano Gatto

----

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

2

Re: iredmail problems

stefanogatto wrote:

what this problem can be?

Seems you missed some upgrade step for iRedAdmin:
https://docs.iredmail.org/upgrade.iredm … -iredadmin

3

Re: iredmail problems

ZhangHuangbin wrote:
stefanogatto wrote:

what this problem can be?

Seems you missed some upgrade step for iRedAdmin:
https://docs.iredmail.org/upgrade.iredm … -iredadmin

here's my iredadmin.tmpl file, modified when I was upgrading, how it should be?

# Settings for iRedAdmin.

# static files under /iredadmin/static
#location ~ ^/iredadmin/static/(.*)\.(png|jpg|gif|css|js) {
#    alias /opt/www/iredadmin/static/$1.$2;
#}
location ~ ^/iredadmin/static/(.*) {
    alias /var/www/iredadmin/static/$1;
}
# Python scripts
location ~ ^/iredadmin(.*) {
    rewrite ^/iredadmin(/.*)$ $1 break;

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

    include uwsgi_params;
    uwsgi_pass unix:/var/run/uwsgi_iredadmin.socket;
    uwsgi_param UWSGI_CHDIR /opt/www/iredadmin;
    uwsgi_param UWSGI_SCRIPT iredadmin;
    uwsgi_param SCRIPT_NAME /iredadmin;

    # Access control
    #allow 127.0.0.1;
    #allow 192.168.1.10;
    #allow 192.168.1.0/24;
    #deny all;
}

# iRedAdmin: redirect /iredadmin to /iredadmin/
location = /iredadmin {
    rewrite ^ /iredadmin/;
}
# Handle newsletter-style subscription/unsubscription supported in iRedAdmin-Pr$
location ~ ^/newsletter/ {
    rewrite /newsletter/(.*) /iredadmin/newsletter/$1 last;
}
BR

4

Re: iredmail problems

found the problem :
I copied the lines of code from the tutorial without paying attention to the correct syntax ( path )

wrong
    alias /var/www/iredadmin/static/$1;

correct
alias /opt/www/iredadmin/static/$1;

BR
thank you for your help anyway