1 (edited by suto 2015-01-23 00:17:18)

Topic: Running iredadmin and iredadmin-pro simultaneously

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

Hi,

How can I run iredadmin and iredadmin-pro simultaneously on the same host?

It would be ideal for a second admin to run open source iredadmin with limited functionality.

I have created softlink "iredadmin-base" pointing to iRedAdmin-0.3 under /var/www and the following httpd config in /etc/httpd/conf.d:

new file iredadmin-base.conf:

WSGISocketPrefix /var/run/wsgi
WSGIDaemonProcess iredadmin-base user=iredadmin threads=15
WSGIProcessGroup iredadmin-base

AddType text/html .py

<Directory /var/www/iredadmin-base/>
    Order allow,deny
    Allow from all
</Directory>

I added following line to ssl.conf:
WSGIScriptAlias /iredadmin-base "/var/www/iredadmin-base/iredadmin.py/"

service httpd restart is OK, https://host/iredadmin works well (pro version) but https://host/iredadmin-base does not work causing internal server error 500.

ssl_error_log:
[Thu Jan 22 16:33:04 2015] [error] [client 10.0.0.1] mod_wsgi (pid=14921): Target WSGI script '/var/www/iredadmin-base/iredadmin.py' cann
ot be loaded as Python module.
[Thu Jan 22 16:33:04 2015] [error] [client 10.0.0.1] mod_wsgi (pid=14921): Exception occurred processing WSGI script '/var/www/iredadmin-
base/iredadmin.py'.
[Thu Jan 22 16:33:04 2015] [error] [client 10.0.0.1] Traceback (most recent call last):
[Thu Jan 22 16:33:04 2015] [error] [client 10.0.0.1]   File "/var/www/iredadmin-base/iredadmin.py", line 9, in <module>
[Thu Jan 22 16:33:04 2015] [error] [client 10.0.0.1]     from libs import iredbase
[Thu Jan 22 16:33:04 2015] [error] [client 10.0.0.1]   File "/var/www/iredadmin-base/libs/iredbase.py", line 18, in <module>
[Thu Jan 22 16:33:04 2015] [error] [client 10.0.0.1]     import iredutils
[Thu Jan 22 16:33:04 2015] [error] [client 10.0.0.1]   File "/var/www/iredadmin-base/libs/iredutils.py", line 13, in <module>
[Thu Jan 22 16:33:04 2015] [error] [client 10.0.0.1]     import settings
[Thu Jan 22 16:33:04 2015] [error] [client 10.0.0.1] ImportError: No module named settings

----

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

2

Re: Running iredadmin and iredadmin-pro simultaneously

suto wrote:

[Thu Jan 22 16:33:04 2015] [error] [client 10.0.0.1] ImportError: No module named settings

Do you have config file '/var/www/iredadmin-base/settings.py'?

3

Re: Running iredadmin and iredadmin-pro simultaneously

ZhangHuangbin wrote:
suto wrote:

[Thu Jan 22 16:33:04 2015] [error] [client 10.0.0.1] ImportError: No module named settings

Do you have config file '/var/www/iredadmin-base/settings.py'?

Yes I have...and that was the problem. File owner and group was wrong. I have changed to 'iredadmin' and now works well.

Thanks!