- Local time
- 10:03 PM
- Posts
- 4,705
- Location
- Hafnarfjörður IS
- OS
- Windows XP,7,10,11 Linux Arch Linux
Hi folks
Messing around again with a local webserver -- learning as I go -- using Apache V2.4 as the web server.
I'm trying to redirect ALL traffic to https instead of http but I can't get it to work -- even with a "Virtual Server"
NameVirtualHost *:80
<VirtualHost *:80>
ServerName mysite.example.com
Redirect permanent / https://mysite.example.com/
</VirtualHost>
<VirtualHost _default_:443>
ServerName mysite.example.com
DocumentRoot /usr/local/apache2/htdocs
SSLEngine On
# etc...
</VirtualHost>
restarted the httpd server
Any help out there appreciated
I'm sure it must be similar in IIS if that's what people are using.
cheers
jimbo
Messing around again with a local webserver -- learning as I go -- using Apache V2.4 as the web server.
I'm trying to redirect ALL traffic to https instead of http but I can't get it to work -- even with a "Virtual Server"
NameVirtualHost *:80
<VirtualHost *:80>
ServerName mysite.example.com
Redirect permanent / https://mysite.example.com/
</VirtualHost>
<VirtualHost _default_:443>
ServerName mysite.example.com
DocumentRoot /usr/local/apache2/htdocs
SSLEngine On
# etc...
</VirtualHost>
restarted the httpd server
Any help out there appreciated
I'm sure it must be similar in IIS if that's what people are using.
cheers
jimbo
My Computer
System One
-
- OS
- Windows XP,7,10,11 Linux Arch Linux
- Computer type
- PC/Desktop
- CPU
- 2 X Intel i7