How to: Setting Up Virtual hosts on Vista
viewtopic.php?p=127591#127591
*************************************
Hi, there, I installed on Vista, and I can't figure out how to do name-based hosting.
The main problem I see (which seems be different from other posters on this forum) is that http://localhost and http://read.local always redirect to the xampp website. I do not know how to stop this.
in the hosts file
- Code: Select all
127.0.0.1 read.local
in httpd-vhosts.conf
- Code: Select all
NameVirtualHost 127.0.0.1:80
<VirtualHost 127.0.0.1:80>
## ServerAdmin webmaster@dummy-host2.example.com
DocumentRoot "I:\My Documents\websites\read"
ServerName read.local
ServerAlias read.local
</VirtualHost>
in httpd.conf
- Code: Select all
ServerRoot "C:/apache/xampp/apache"
Listen 80
ServerName localhost:80
DocumentRoot "C:/apache/xampp/htdocs"
<Directory />
Options FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
</Directory>
<Directory "C:/apache/xampp/htdocs">
Order allow,deny
Allow from all
</Directory>
<IfModule dir_module>
DirectoryIndex index.php index.php4 index.php3 index.cgi index.pl index.html index.htm index.shtml index.phtml
</IfModule>
# Virtual hosts
Include conf/extra/httpd-vhosts.conf
# XAMPP specific settings
Include conf/extra/httpd-xampp.conf
I have not touched httpd-xampp.conf. Some other notes.
I can create a subdirectory under C:/apache/xampp/htdocs"
<Directory /> and access it by going to http://localhost/read
or http://read.local/read
If I rename the index.html and index.php files inside this directory, I get a directory listing.
I think I have tried all the obvious things. All except one thing. But what is it?