Re: Virtual Hosts For some reason wont work
Posted: 24. August 2009 19:12
Try this as there seems to be mixed forward and back slashes.
Change the path in the localhost vhost to reflect your own installation path of XAMPP
If on Vista, sometimes forward slashes / have been known to play up so change them all to back slashes \.
The DocumentRoot and the <Directory> directives should both be exactly the same as should the NameVirtualHost and the <VirtualHost> directives.
URIs covered above are:
http://localhost
http://development.abba.laptop
http://laptop.abba
Make sure you add these to your C:\Windows\system32\drivers\etc\Hosts file and the first uncommented entries should look like this:
Here's a link to all the Apache Directives:
http://httpd.apache.org/docs/2.2/mod/directives.html
- Code: Select all
NameVirtualHost *:80
<VirtualHost *:80>
DocumentRoot "C:/xampp/htdocs"
ServerName localhost
</VirtualHost>
<VirtualHost *:80>
ServerName development.abba.laptop
ServerAlias laptop.abba
DocumentRoot "C:/web/projects/abba/web"
<Directory "C:/web/projects/abba/web">
Options Indexes +FollowSymLinks Includes ExecCGI
AllowOverride All
Order allow,deny
Allow from all
</Directory>
##ServerAdmin postmaster@dummy-host.localhost
CustomLog "C:/web/logs/abba/access.log" combined
ErrorLog "C:/web/logs/abba/error.log"
LogLevel debug
</VirtualHost>
Change the path in the localhost vhost to reflect your own installation path of XAMPP
If on Vista, sometimes forward slashes / have been known to play up so change them all to back slashes \.
The DocumentRoot and the <Directory> directives should both be exactly the same as should the NameVirtualHost and the <VirtualHost> directives.
URIs covered above are:
http://localhost
http://development.abba.laptop
http://laptop.abba
Make sure you add these to your C:\Windows\system32\drivers\etc\Hosts file and the first uncommented entries should look like this:
- Code: Select all
127.0.0.1 localhost
127.0.0.1 development.abba.laptop
127.0.0.1 laptop.abba
Here's a link to all the Apache Directives:
http://httpd.apache.org/docs/2.2/mod/directives.html