Change standard Virtual Host file

Tazmanian79

Verified User
Joined
Jul 24, 2010
Messages
106
Hello,

I already searched this forum but didn't find the answer.
On my server I have several websites. Some have SSL others not.

For one website I have edited the Virtual Host file for that domain with this: (located usr/local/directadmin/data/users/xxxx/)

<VirtualHost xxxx:80 >

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
</IfModule>

</VirtualHost>

<VirtualHost xxxx:443 >

Header always set Strict-Transport-Security "max-age=63072000; includeSubDomains; preload"

</Directory>
</VirtualHost>


But now I want to have these also for all the other websites that have SSL enable. I would like to enter the standard Host file.
Where can I find it and what should I change to have the above lines enable for each website that has SSL enabled?
 
Anyone that can help?

Is there an IF SSL ENABLED option? So something gets added to the :80 and the :443 lines if SSL is enabled for that domain?
 
Back
Top