Access forbidden Error 403

The Dude picture The Dude · Mar 12, 2015 · Viewed 9.1k times · Source

I am really close to having a meltdown here. I did a fresh install of XAMPP because of some trouble with starting MySQL database. The fresh install fixed that problem, but now I cant access localhost/project1.

The folder is placed in the htdocs folder and I just get the "Access forbidden!" message when I try to access it in my browser. I've spent 5 hours on this now and getting pretty pretty pretty desperate. All I want is to finish my assignment. Can anyone help me? Feels like I've tried EVERYTHING. Why is this even a problem?

Answer

RaMeSh picture RaMeSh · Mar 12, 2015

I think this is also one way for rectifying Access forbidden Error 403 . Please Follow these steps.

First Process:-

Step 1:-

  • Goto \XAMPP\apache\conf\extra\httpd-vhosts.conf file.
  • And change this file as
<VirtualHost *:8001>
  ServerAdmin "[email protected]"
  DocumentRoot "D:\XAMPP\htdocs\xyz"
  ServerName "localhost:8001"
  <Directory "D:\XAMPP\htdocs\xyz">
         Allow from all
  </Directory>
</VirtualHost>

Note:-xyz is a project name.

Step 2:-

  • Goto \XAMPP\apache\conf\httpd.conf file and chenge

    Listen 8001 and ServerName localhost:8001

Restart your xampp and i think now everything is fine.

Note:-(Url:- localhost:8001/xyz)

Second Process:-

Step 1:-

  • Change \XAMPP\apache\conf\extra\httpd-xampp.conf .
  • In New XAMPP security concept of this code replace this below code
 #
 # New XAMPP security concept
 # <LocationMatch “^/(?i:(?:xampp|security|licenses|phpmyadmin|webalizer|server-status|server-info))”>
 Order deny,allow Allow from all Allow from ::1 127.0.0.0/8
 ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var </LocationMatch>