XAMPP Windows Setup SSL

In an earlier post, I documented my XAMPP Windows Setup for myself and anyone else would find it useful. Now I am adding SSL to the virtual host configuration and this post will document that process.

XAMPP Configuration

C:\xampp\apache\conf\extra\httpd-vhosts.conf
# virtual hosts
NameVirtualHost *:8080
NameVirtualHost *:443

<VirtualHost *:8080>
  DocumentRoot C:/xampp/htdocs
  ServerName localhost
</VirtualHost>

# For htaccess rewrites to work AllowOverride
# needs to be set to All instead of None

<VirtualHost *:443>
  DocumentRoot "C:/xampp/htdocs/mysite"
  ServerName mysite.dev
  SSLEngine on
  SSLCertificateFile "conf/ssl.crt/server.crt"
  SSLCertificateKeyFile "conf/ssl.key/server.key"
  <Directory "C:/xampp/htdocs/mysite">
    Options Indexes MultiViews FollowSymLinks
    AllowOverride All
    Order allow,deny
    Allow from all
    </Directory>
</VirtualHost>

<VirtualHost *:8080>
  DocumentRoot "C:/xampp/htdocs/mysite"
  ServerName mysite.dev
  ServerAlias www.mysite.dev
  SetEnv APPLICATION_ENV development
  <Directory "C:/xampp/htdocs/mysite">
    Options Indexes MultiViews FollowSymLinks
    AllowOverride All
    Order allow,deny
    Allow from all
  </Directory>
</VirtualHost>

Part 2 of 2 in the XAMPP Windows Setup series.

XAMPP Windows Setup

comments powered by Disqus