Sample Apache Virtual Host in Windows with XAMPP

Reference to self:

1. Activate vhosts in XAMPP by going to http.conf and check if

# Virtual hosts
Include conf/extra/httpd-vhosts.conf

is present (if commented out, uncomment it)

2. Set up http-vhosts.conf (usually inside “extra” folder) with below sample (change server admin, name and directories to the appropriate values)

NameVirtualHost *:80

    DocumentRoot “D:DevSitesFolderOfSite”
    ErrorLog “logs/site-localhost-com-error.log”
    CustomLog “logs/site-localhost-com-access.log” common
 <directory ev=”” ites=”” olderofsite=”” public=””>
  Options Indexes FollowSymLinks Includes ExecCGI
  AllowOverride All
  Require all granted

3. Change hosts file in Windows (usually c:windowssystem32driversetc)

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.