Apache Lounge



Forum Index Downloads Search Register Log in  RSS Apache Lounge

Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.



A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Apache Lounge is not sponsored.

Your donations will help to keep this site alive and well, and continuing building binaries.

redirect problem

Post new topic   Reply to topic    Apache Forum Index -> Apache

View previous topic :: View next topic  
Author Message

Joined: 19 Jul 2018
Posts: 6
Location: china

PostPosted: Fri 20 Jul '18 9:39    Post subject: redirect problem Reply with quote

my web has ssl cert .

when type "http://my_domain.com" it works fine.

but when type "https://my_domain.com" , it will automatically directed to a subdomain ( http://xxx.my_domain.com , which this subdomain is config in my http-ssl.conf , and it is the first VirtualHost in this config file ) .

I amd wonder why the page to be redirected to subdomain .

To fix this problem , the best way is use apache redirect ?

I know apache redirect have many ways to set it as below , would advise which one is better ? thanks


The below method is the best ?

<VirtualHost *:80>
ServerName my_domain.com
Redirect / https://my_domain.com
Back to top

Joined: 05 Feb 2012
Posts: 55
Location: Germany, Heilbronn

PostPosted: Mon 23 Jul '18 13:17    Post subject: Reply with quote

Actually, the best method is to correct the SSL config.

If you do not use multiple SSL secured sites, you can do all the relevant configurations in ssl.conf.

The Redirect mentioned in your post will redirect HTTP to HTTPS and looks Ok.

The SSL portion does not require VirtualHost if it is just one SSL secured site.
Back to top

Post new topic   Reply to topic    Apache Forum Index -> Apache
Page 1 of 1