Topic: /iredadmin Python issue when connecting from internet
======== Required information ====
- iRedMail version: 0.8.7
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL
- Linux/BSD distribution name and version: Ubuntu 12.04.4 LTS
- Related log if you're reporting an issue: Attched
====
I noticed when I try to connect to iRedAdmin on my mail server from the internet, or by URL on my intranet (https://www.mydomain.net/iredadmin/ or https://myhost.domain.pvt:8443/iredadmin/) I get an HTTP 403 Forbidden error, like the browser Is trying to just display a directory listing. If I add "iredadmin.py" to the end of either URL, the browser displays the raw code like this:
#!/usr/bin/env python # Author: Zhang Huangbin import os import sys rootdir = os.path.abspath(os.path.dirname(__file__)) sys.path.insert(0, rootdir) from libs import iredbase # Initialize webpy app. app = iredbase.app if __name__ != '__main__': # Run app under Apache + mod_wsgi. application = app.wsgifunc() else: # Starting webpy builtin http server. app.run()
I added, for testing purposes, a python script to my iredadmin directory (/usr/share/apache2/iredadmin) called "hi.py". I hit it from either of the 2 URLs above (https://www.mydomain.net/iredadmin/hi.py or https://myhost.domain.pvt:8443/iredadmin/hi.py) and I get the same behavior:
def index(request): return "Hello World!"
Both activities generate an HTTP 304 error in my logs.
If, however, I launch the mini webserver for python (python iredadmin.py) and open "https://localhost:8080" I can login and administer my mail no problem!!
Have you ever seen this behavior? How do I fix it?
Thanks!
Chris
----
Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.