0

After installing XAMPP and creating index.php, I try open my index.php but write error:

Access forbidden!

You don't have permission to access the requested directory. There is either no index document or the directory is read-protected.

If you think this is a server error, please contact the webmaster.

Error 403

chat1.by Apache/2.4.9 (Win32) OpenSSL/1.0.1g PHP/5.5.11

File httpd-vhosts.conf:

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

  <VirtualHost *:80>
    DocumentRoot "C:\xampp\htdocs\PHPProjects\chat.by"
    ServerName chat.by
  <Directory "C:\xampp\htdocs\PHPProjects\chat.by">
    Order allow,deny
    Allow from all
  </Directory>
</VirtualHost>

  <VirtualHost *:80>
    DocumentRoot "C:\Projects\PHP\chat.by"
    ServerName chat1.by
  <Directory "C:\Projects\PHP\chat.by">
    Order allow,deny
    Allow from all
  </Directory>
</VirtualHost>

But site chat1.by open normal. May be I need add path "C:\Projects\PHP\chat.by" somewhere else?

File hosts:

127.0.0.1       chat.by
127.0.0.1       chat1.by
Shubham Bhave
  • 383
  • 6
  • 17
Sashka
  • 53
  • 1
  • 1
  • 4

0 Answers0