httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eric Covener <cove...@gmail.com>
Subject Re: [users@httpd] VirtualHost Problems
Date Sat, 24 Mar 2018 19:04:31 GMT
On Sat, Mar 24, 2018 at 2:52 PM, Jerry Malcolm <techstuff@malcolms.com> wrote:
> I am having a problem with my virtual host config.  Here's the basic config:
>
>       <VirtualHost xx.xx.xx.xx:80>
>            ServerName   domainA
>            Redirect permanent / https://domainA/
>       </VirtualHost>
>
>       <VirtualHost xx.xx.xx.xx:443>
>            ServerName   domainA
>            [normal host config stuff]
>       </VirtualHost>
>
>       <VirtualHost xx.xx.xx.xx:80>
>            ServerName   domainB
>            Redirect permanent / https://domainB/
>       </VirtualHost>
>
>       <VirtualHost xx.xx.xx.xx:443>
>            ServerName   domainB
>            [normal host config stuff]
>       </VirtualHost>
>
> Basically 2 domains where non-ssl requests get routed to the ssl port.
>
> The problem is that when I go to http://domainA it redirects (and changes
> the URL on the browser) to https://domainB.  If I go straight to
> https://domainA it works correctly.
>
> I figure either I have some config typo that I can't find or I'm totally
> misunderstanding how virtual host resolution works.

apachectl -S might show you vhosts you aren't looking at.  Make sure
there are none without a ServerName.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message