I did following to allow that:
1. Add VirtualHosts - one for every root and add 'NameVirtualHost" directive. It is typically located in "extra\httpd-vhosts.confd" file. If you have your XAMPP in "C:\xampp", the path will be "C:\xampp\apache\conf\extra\httpd-vhosts.confd"
== httpd-vhosts.confd ===
NameVirtualHost 127.0.0.1
DocumentRoot "D:/xxx/yyy/zzz/prj1"
ServerName prj1
DocumentRoot "D:/xxx/yy/zzz/prj2"
ServerName prj2
DocumentRoot "D:/xxx/ttt/www/prj3"
ServerName prj3
2. Go to htppd.conf ( "C:\xampp\apache\conf\httpd.conf" in your XAMPP installation) and
verify that you hvae access permissions for every document root folder for prj1,2,3. Otherwwise
you end up with "Access Frobidden!" page.
=== httpd.conf ====
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Order allow,deny
Allow from all
## The same "
3. Go to Windows hosts file ("C\Windows\system32\drivers\etc\hosts" or similar) and add there new virtual hosts prj1,2,3, so you
can access them just by http://prj1 in your browser
=== hosts ===
127.0.0.1 prj1
127.0.0.1 prj2
127.0.0.1 prj3
4. Restart Apache and pint your browser to "prj1". You should be done now
No comments:
Post a Comment