Software >> Services >> HTTP Server >> Apache >>  How to add configuration for virtual directory

 

This example is based on the following

  • apache distributed with xampp
  • docroot is c:/xampp/htdocs
  • xampp was freshly installed and no customisation in httpd.conf yet

1.  edit c:\xampp\apache\conf\httpd.conf and add the following at the bottom of the file

# Virtual directory settings
Include "conf/extra/httpd-virtualdir.conf"
 

2.  ensure that the following is present and not commented

LoadModule alias_module modules/mod_alias.so
 

3.  edit c:\xampp\apache\conf\extra\httpd-virtualdir.conf and add the following to create the virtualdir /abc

<IfModule alias_module>

Alias /abc "c:/someparentdir/somedir"

<Directory "c:/someparentdir/somedir">
    Options Indexes FollowSymLinks Includes ExecCGI
    Order allow,deny
    Allow from all
    Require all granted
</Directory>

</IfModule>
 

 

Deals @yubeshop.com