4

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

I am using username and passowrd on 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 doesn't work with E:\My Projects\wesites\read\index.html

I brief want to run my project from E:\My Projects\wesites\read

Swati kothari
  • 105
  • 2
  • 7
  • Can you access your folder? Do you have permission to do that? Do you have an index file? Also, why do you want to host the website on Windows XP??? – Lajos Arpad Oct 13 '13 at 14:17
  • Refer this its work for me -- https://stackoverflow.com/a/2658510/13248471 – Shivam Aug 20 '20 at 05:40

1 Answers1

0

You need match the ServerName to the address you have in 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 at read.local.

More info here