1 (edited by Zanzibar 2016-04-20 05:53:49)

Topic: [Solved] mydomain.com without SSL?

==== Required information ====
- iRedMail version (check /etc/iredmail-release): 0.9.4
- Linux/BSD distribution name and version: Ubuntu 14.04 server edition
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL
- Web server (Apache or Nginx): Apache
- Manage mail accounts with iRedAdmin-Pro? No
- Related log if you're reporting an issue:
====

I'm trying to set up a virtual host for the default "mydomain.com" that does not use SSL, so mydomain.com just shows my website. I want to leave mydomain.com/mail and other iredmail links using SSL. I've created and enabled a conf file for my subdomain:

<VirtualHost *:80>
        ServerAdmin postmaster@mydomain.com
        ServerName mydomain.com
        ServerAlias www.mydomain.com
        DocumentRoot /var/www/default

        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

But whenever I navigate to http://mydomain.com or http://www.mydomain.com, it instantly redirects to https://mydomain.com  and redirects to https://mydomain.com/mail.

Any help on fixing this would be really appreciated!

----

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

2

Re: [Solved] mydomain.com without SSL?

Open file /etc/apache2/sites-enabled/default-ssl.conf, comment out the HSTS setting, restart Apache service:

Header always set Strict-Transport-Security  ...

3

Re: [Solved] mydomain.com without SSL?

Thanks for the suggestion! I did what you said, and now I can browse to www.mydomain.com without it redirecting, but mydomain.com still redirects to https. What else am I missing?

4

Re: [Solved] mydomain.com without SSL?

Ok, figured it out. The original fix worked, I just had to clear HSTS settings in chrome for my domain. I navigated to chrome://net-internals, then HSTS in the dropdown menu. Then I deleted my domain in the "delete domain" section.