Configuring virtual hosts for XAMPP on windows

XAMPP for Windows 1.8.2 PHP 5.4, Operating System: windows xp

I use username and passowrd in XAMPP

C: \ Windows \ system32 \ Drivers \ Etc \ hosts 127.0.0.1 hindustans.local 127.0.0.1 read.local

E: \ My projects \ wesites \ read index.html

HTTPD-vhosts.conf

    <Directory "E:/My Projects/wesites/read">
     Options Indexes FollowSymLinks
     AllowOverride All
    Order allow,deny
    Allow from all
  </Directory>

  <VirtualHost *:80>
    DocumentRoot "C:/xampp/htdocs"
    ServerName localhost
  </VirtualHost>
   <VirtualHost *:80>
    DocumentRoot "E:/My Projects/wesites/read"
    ServerName read
    Options +Indexes
    </VirtualHost>

read.local works fine with c: \ xampp \ htdocs But read.local does not work with E: \ My projects \ wesites \ read \ index.html

I briefly want to start a project from E: \ My Projects \ wesites \ read

+4
source share
1 answer

You need to match the server name with the address that you have on the hosts and give it permission

<VirtualHost *:80> DocumentRoot "E:/My Projects/wesites/read" ServerName read.local <Directory "E:/My Projects/wesites/read" > Options Indexes FollowSymLinks Includes ExecCGI Order allow,deny Allow from all </Directory> </VirtualHost>

then try to access the site in read.local.

0

All Articles