I am having problems setting up SSL in Virtual Hosts. The setup works great on unsecure sites. And I want it to work with SSLEnabled sites.
My httpd-vhosts.conf is below:
NameVirtualHost 127.0.0.1
<IfModule mod_rewrite.c>
RewriteEngine On
# Redirect /binDebug folder to https
RewriteCond %{HTTPS} !=on
RewriteCond %{REQUEST_URI} binDebug
RewriteRule ^(.*) https://%{SERVER_NAME}$1 [R,L]
</IfModule>
<VirtualHost localhost>
ServerName localhost
DocumentRoot "C:\xampp\htdocs"
DirectoryIndex index.php index.html
<Directory "C:\xampp\htdocs">
AllowOverride All
</Directory>
</VirtualHost>
<VirtualHost virtual.c7beta.com>
ServerName virtual.c7beta.com
DocumentRoot "C:\Users\zee\Documents\Flex Builder 3\CLOUD\bin-debug"
DirectoryIndex index.php index.html
Alias /binDebug "C:\Users\zee\Documents\Flex Builder 3\CLOUD\bin-debug/"
<Directory "C:\Users\zee\Documents\Flex Builder 3\CLOUD\bin-debug">
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Order allow,deny
Allow from all
# SSLRequireSSL
</Directory>
</VirtualHost>
<VirtualHost virtual.app.c7beta.com>
ServerName virtual.app.c7beta.com
DocumentRoot "C:\development\app_server\httpdocs"
DirectoryIndex index.php index.html
<Directory "C:\development\app_server\httpdocs">
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Order allow,deny
Allow from all
# SSLRequireSSL
</Directory>
</VirtualHost>
<VirtualHost virtual.s1.c7beta.com>
ServerName virtual.s1.c7beta.com
DocumentRoot "C:\development\storage_server\httpdocs"
DirectoryIndex index.php index.html
<Directory "C:\development\storage_server\httpdocs">
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Order allow,deny
Allow from all
# SSLRequireSSL
</Directory>
</VirtualHost>
Right now the SSLRequiesSSL is commented. Can some one check this and tell me what changes should I make to use https, just the way http was working.
I did the configuration changes as suggested by: http://robsnotebook.com/xampp-ssl-encrypt-passwords and it seems like working fine. But still when I type in with my servername.com it redirects to servername.com/xampp
Please help Zeeshan