1

Topic: 404 while trying to access /iredadmin

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): 0.9.9 MYSQL edition.
- Deployed with iRedMail Easy or the downloadable installer? installer
- Linux/BSD distribution name and version: Ubuntu 18.04.2
- Store mail accounts in which backend (LDAP/MySQL/PGSQL):  MySQL
- Web server (Apache or Nginx): Apache
- Manage mail accounts with iRedAdmin-Pro? no
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====

Hi, seems after upgrading my host machine to Ubuntu 18.04 I have troubles accessing to ireadmin (Roundcube webmail is working fine).
I think it has something to do with my apache config, but I cannot find any related logs or posts.

My

/etc/apache2/conf-available/iredadmin.conf

looks like

WSGIScriptAlias /iredadmin /var/www/iredadmin/iredadmin.py/
Alias /iredadmin/static /var/www/iredadmin/static/
WSGISocketPrefix /var/run/wsgi
WSGIDaemonProcess iredadmin user=iredadmin threads=15
WSGIProcessGroup iredadmin

AddType text/html .py

<Directory /opt/www/iredadmin/>
    Order deny,allow
    Allow from all
</Directory>

Seems there is no errors in logs (or I cannot find them), but accessing my https://server/iredadmin give me 404 error

----

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

2

Re: 404 while trying to access /iredadmin

shockwavenn wrote:

WSGIScriptAlias /iredadmin /var/www/iredadmin/iredadmin.py/
Alias /iredadmin/static /var/www/iredadmin/static/

Is it /opt/www or /var/www?

3

Re: 404 while trying to access /iredadmin

Oh, thanks for noticing, stupid typo.
Now my

/etc/apache2/conf-available/iredadmin.conf

looks like this

WSGIScriptAlias /iredadmin /opt/www/iredadmin/iredadmin.py/
Alias /iredadmin/static /opt/www/iredadmin/static/
WSGISocketPrefix /var/run/wsgi
WSGIDaemonProcess iredadmin user=iredadmin threads=15
WSGIProcessGroup iredadmin

AddType text/html .py

<Directory /opt/www/iredadmin/>
    Order deny,allow
    Allow from all
</Directory>

And https://server/iredadmin is 403 forbidden
Permission in /opt/www are

ls -la /opt/www/
total 24
drwxr-xr-x  6 root      root      4096 May 21 07:36 .
drwxr-xr-x  8 root      root      4096 Feb 12 08:12 ..
lrwxrwxrwx  1 iredadmin iredadmin   15 May 21 07:36 iredadmin -> iRedAdmin-0.9.7
dr-xr-xr-x 10 iredadmin iredadmin 4096 Nov 30  2017 iRedAdmin-0.8
dr-xr-xr-x 11 iredadmin iredadmin 4096 Feb 12 09:01 iRedAdmin-0.9.4
dr-xr-xr-x 11 iredadmin iredadmin 4096 May 21 08:01 iRedAdmin-0.9.7
lrwxrwxrwx  1 root      root        28 Nov 30  2017 roundcubemail -> /opt/www/roundcubemail-1.3.0
drwxr-xr-x 13 root      root      4096 Feb 12 07:12 roundcubemail-1.3.0

4

Re: 404 while trying to access /iredadmin

shockwavenn wrote:

And https://server/iredadmin is 403 forbidden

Check Apache log to figure out which file it accesses, and check the file/directory permission.

5

Re: 404 while trying to access /iredadmin

ZhangHuangbin wrote:
shockwavenn wrote:

And https://server/iredadmin is 403 forbidden

Check Apache log to figure out which file it accesses, and check the file/directory permission.

At file

/etc/apache2/conf-available/iredadmin.conf

There is

[Tue May 28 15:38:52.694117 2019] [authz_core:error] [pid 5146] [client 142.93.167.28:42434] AH01630: client denied by server configuration: /opt/www/iredadmin/iredadmin.py

and

wget localhost/iredadmin

return 403 as well

6

Re: 404 while trying to access /iredadmin

Does Apache have permission to access /opt/www/iredadmin (and iredadmin.py)?

7

Re: 404 while trying to access /iredadmin

Seems problem fixed by
changing this part of

/etc/apache2/conf-available/iredadmin.conf
<Directory /opt/www/iredadmin/>
    Order deny,allow
    Allow from all
</Directory>

to

<Directory /opt/www/iredadmin/>
     Require all granted
</Directory>

according to stackoverflow
And syntax change on update apache from 2.2 to 2.4 (as I mention iredadmin broke on upgrade to Ubuntu 18.04)

Thanks, I think issue should be closed