1

Topic: iRedAdmin nginx without subdomain

==== Required information ====
- iRedMail version: 0.8.7
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): PGSQL
- Linux/BSD distribution name and version: Debian Wheezy 64
- Related log if you're reporting an issue:
====

Hello,

heard about next version that can run nginx out of box, but can't wait and need it working now.
Roundcubemail, phppgadmin works good at example.com/roundcubemail and example.com/phppgadmin

but

iRedAdmin works only as app.example.com, but I must have it working at example.com/app

THIS WORKS PERFECT AT iredadmin.example.com

server {
        ssl on;
        ssl_certificate /etc/nginx/ssl/server.crt;
        ssl_certificate_key /etc/nginx/ssl/server.key;
        ssl_session_timeout  5m;
        ssl_protocols  SSLv2 SSLv3 TLSv1;
        ssl_ciphers  ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP;
        ssl_prefer_server_ciphers   on;
listen 443;
server_name iredadmin.example.com;
        # iRedAdmin
        root /var/www;
        location / {
        uwsgi_pass unix:/var/run/uwsgi/app/iredadmin/iredadmin.socket;
        uwsgi_param UWSGI_PYHOME /var/www/iredadmin/python-home;
        uwsgi_param UWSGI_CHDIR /var/www/iredadmin;
        uwsgi_param UWSGI_SCRIPT iredadmin;
        include uwsgi_params;
        }

        location /static {
        alias /var/www/iredadmin/static/;
        }

}

but when i want to run it as example.com/iredadmin nginx gives me 'not found'

upstream iredadmin {
    server unix:///var/run/uwsgi/app/iredadmin/iredadmin.socket;
}

server {
        listen 443;
        server_name example.com;
        access_log /var/log/nginx/example.access.log;
        error_log /var/log/nginx/example.error.log debug;
        ssl on;
        ssl_certificate /etc/nginx/ssl/server.crt;
        ssl_certificate_key /etc/nginx/ssl/server.key;
        ssl_session_timeout  5m;
        ssl_protocols  SSLv2 SSLv3 TLSv1;
        ssl_ciphers  ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP;
        ssl_prefer_server_ciphers   on;
        root /var/www;     
        # MAIN
        location / {
            root /var/www;
            index  index.php index.html;
        (...)
        # iRedAdmin
        location /iredadmin {
        uwsgi_pass iredadmin;
        uwsgi_param UWSGI_PYHOME /var/www/iredadmin/python-home;
        uwsgi_param UWSGI_CHDIR /var/www/iredadmin;
        uwsgi_param UWSGI_SCRIPT iredadmin;
        include uwsgi_params;
        alias /var/www/iredadmin/;
        }

        location /static {
        alias /var/www/iredadmin/static/;
        }


}

----

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

2

Re: iRedAdmin nginx without subdomain

Check our sample config files under: https://bitbucket.org/zhb/iredmail/src/ … les/nginx/
You need file "default.conf".

This sample config file works for me on CentOS/RHEL 6, Debian 7, Ubuntu 14.04 LTS, OpenBSD 5.5.

3

Re: iRedAdmin nginx without subdomain

Thanks! It works now!