1

I'm new to php, I did installed xampp-win32-1.8.2-2-VC9-installer on my window7 desktop pc. PHP page run from C:\xampp\htdocs but when i create virtual host and tried to access php file in d:\web\ it shows access forbidden.

my host file code 127.0.0.1 localhost1

my httpd-vhost file code

NameVirtualHost *
<VirtualHost *>
  DocumentRoot "C:/xampp/htdocs"
  ServerName localhost
</VirtualHost>

<VirtualHost localhost1:80>
  DocumentRoot "d:/web/test.php"
  ServerName localhost1    
<Directory "d:/web/test.php">
  AllowOverride All
  Require all granted
</Directory>
</VirtualHost>

I don't know now where i have to change

Marek
  • 7,337
  • 1
  • 22
  • 33

1 Answers1

0

It's a file permissions derived issue. Try changing NTFS permissions in "C:/xampp/htdocs" to allow read and execute permissions to the user that is running the web server, you should be able to see who that user is in the Apache configuration file, tipically "apache" which is the equivalent to IUSR in IIS.

Daniel J.
  • 308
  • 2
  • 12