No announcement yet.

Automatic redirect HTTP to HTTPS

This topic is closed.
This is a sticky topic.
  • 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: : 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.

    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).



    This is the legacy Axigen forum, which is no longer active.

    To create new topics & posts, please visit the new Axigen community.

    Axigen Community