How to setup SSI and Virtual host in wamp/xampp

Setup SSI (server side include)

  1. open httpd.conf
  2. comment out – LoadModule include_module modules/mod_include.so
  3. add - AddHandler server-parsed .html inside <IfModule mime_module> tag  (or) this can be done through .htaccess file
  4. find – Options Indexes FollowSymLinks and replace with Options +Includes +Indexes +FollowSymLinks
  5. save & close & restart wamp/xampp
  6. Done

Setup Virtual Host

  1. open httpd.conf
  2. comment out – Include conf/extra/httpd-vhosts.conf
  3. Find Listen 80 and add one more below e.g. Listen 8081
  4. go to C:\wamp\bin\apache\Apache2.4.4\conf\extra and open httpd-vhosts.conf
  5. add – <VirtualHost *:8081>
    DocumentRoot “c:/wamp/www/{project folder name}/”
    </VirtualHost>
    (other <VirtualHost> can be removed)
  6. save & close & restart wamp
  7. Done

Note :

  • remove # to comment out
  • add multiple listener and <VirtualHost> to point your project’s docroot