Axigen Community Forum

  • If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Announcement

Collapse
No announcement yet.

Automatic redirect HTTP to HTTPS

Collapse
This topic is closed.
X
This is a sticky topic.
X
X
  • Filter
  • Time
  • Show
Clear All
new posts

    Automatic redirect HTTP to HTTPS

    In order to achieve this behavior Apache WebServer must be installed. No additional configuration is needed except for the one presented in this article.

    First of all you must set up SSL for the Webmail interface. In order to do so create a new listener for the Webmail service:
    Webadmin -> Services -> Webmail -> click on "Add Listener"
    and type:
    0.0.0.0 : 443 (IP : port)
    and check "Enable this Listener", then click on "Advanced Config".
    Click on "SSL Settings":
    - check the option: "Enable SSL for this listener"
    - make sure the "Path to certificate file" field contains a valid path to a .pem certificate.

    NOTE: If you do not have a certificate you can use the default one generated during the installation. Its path is <axigen_var_parh>/axigen_cert.pem
    The <axigen_var_path> is either "/var/opt/axigen", "/var/axigen" or "C:Program FilesAxigen Mail Server" depending on your operating system.

    NOTE: If you have another listener for the Webmail interface you may disable it and leave only the secure listener enabled. If this non secure listeners is configured for port 80 you must disable it or change the port configuration in order to let Apache bind on port 80.

    If everything is set properly, Axigen should bind on the secure port 443 and Apache should bind on it's default port 80 and accepting standard HTTP requests. Use "netstat" command to verify this.

    In order to configure Apache to automatically redirect HTTP requests to HTTPS you must edit Apache's configuration file (httpd.conf or apache2.conf) and add the following line at the end of the file:

    Redirect / https://<Axigen Public IP Address or Webmail Address>

    Replace "<Axigen Public IP Address or Webmail Address>" accordingly.

    Don't forget to restart/reload Apache to read this new configuration.

    #2
    This setup is obsolete in the new versions of Axigen where you could choose "Redirect to secure login page Automatically" on a plain WebMail listeber (more details could be found in the documentation, WebMail Listeners, Virtual Hosts & Control Rules section).

    Comment

    Working...
    X