How to Configure XAMPP Virtual Host in Windows 10

Configure Virtual Host with SSL

  1. Create an SSL Certificate, discussed in the next article.
    For example a certificate with the file name “server.crt“, “server.key
  2. Place the SSL certificate on “C:\XAMPP\apache\conf”
  3. Add the following code at the end of the httpd-vhosts.conf file
<virtualhost *:443>
    ServerName www.example1.com
    DocumentRoot "C:\XAMPP\htdocs\www.example1.com"
    SSLEngine on
    SSLCertificateFile "conf/ssl.crt/server.crt"
    SSLCertificateKeyFile "conf/ssl.key/server.key"
   <directory "c:\xampp\htdocs\www.example1.com">
        Options Indexes FollowSymLinks Includes ExecCGI
        Order allow,deny
        Allow from all
  </directory>
</virtualhost>

Latest Articles