Author Topic: How can I enable force HTTPS for Apache webserver for all domains?  (Read 2139 times)

0 Members and 2 Guests are viewing this topic.

Offline
*
I tried searching and looking around and found nothing for Apache.
How can I resolve this without htaccess files.

Offline
***
Re: How can I enable force HTTPS for Apache webserver for all domains?
« Reply #1 on: December 13, 2022, 07:17:23 PM »
webserver--> mainconfig ?

Offline
*
Re: How can I enable force HTTPS for Apache webserver for all domains?
« Reply #2 on: December 14, 2022, 12:55:08 PM »
webserver--> mainconfig ?

Nope, nothing related to https or force https there.

Offline
***
Re: How can I enable force HTTPS for Apache webserver for all domains?
« Reply #3 on: December 17, 2022, 04:37:21 AM »
webserver--> mainconfig ?

Nope, nothing related to https or force https there.


goodluck then

Offline
*****
Re: How can I enable force HTTPS for Apache webserver for all domains?
« Reply #4 on: February 10, 2023, 07:31:37 AM »
It's possible to do a permanent redirect in the vhost config:
Code: [Select]
<VirtualHost *:80>
  ServerName example.com
  ServerAlias www.example.com

  Redirect permanent / https://example.com/
</VirtualHost>

But a 301 redirect is preferred. In vhost conf or in .htaccess:
Code: [Select]
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://example.com/$1 [L,R=301]