After some sleep I figured out that
the problem was the incorrect redirection.
So if I call https directly it works. For example
https://sub2.myexample.com
will get me to the right location.
If I visit
http://sub2.myexample.com
it redirects to
https://sub1.myexample.com
This is the first configuration I tried:
<VirtualHost *:80>
ServerName logs.markouassociates.com
ServerName logs
RewriteCond %{HTTPS} !=on
RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L]
</VirtualHost>
and this is the second:
<VirtualHost *:80>
ServerName logs.markouassociates.com
ServerName logs
Redirect permanent / https://sub2.example.com/
</VirtualHost>
but none of them worked.
I do not use any https redirection on sub1.example.com. https is
enforced by the application rather than apache config.
On 06/09/2014 01:28 πμ, Yehuda Katz wrote:
You don't need NameVirtualHost, but you do need
ServerName and/or ServerAlias directives to tell apache which
ghost serves which site.
- Y
Sent from a gizmo with a very small keyboard and
hyperactive autocorrect.
On Sep 5, 2014 6:07 PM, "Theodotos
Andreou" <
theo@xxxxxxxxxxxx>
wrote:
I
am using a wildcard cert for both vhosts
#
apache2 -version
Server version: Apache/2.4.7 (Ubuntu)
Server built: Jul 22 2014 14:36:38
This is the stock apache from Ubuntu 14.04.01
SSLStrictSNIVHostCheck has not been enabled:
# Whether to forbid non-SNI clients to access name
based virtual hosts.
# Default: Off
#SSLStrictSNIVHostCheck On
Any
hints to the right direction? How can I troubleshoot
this issue further?