Connect with us

Simple Steps to Fix 403 Forbidden Errors in Wamp Server

Software Technologies

Simple Steps to Fix 403 Forbidden Errors in Wamp Server

Have you recently installed Wamp server? are you getting 403 forbidden error? are you looking for information on how to fix this error quickly? Don’t worry, this article can solve your problem in minutes.

403 forbidden is the most common error being faced by developers while installing WAMP server. If you’re one who just installed Wamp server 2.2 and got this error message “403 Forbidden Error – You don’t have permission to access / on this server.”, don’t panic, you can fix this forbidden error in just 5 minutes by following these 5 simple steps.forbidden error msg

Forbidden errors generally occur due to permission mismatch and can solve by editing .conf and .conf files. In most cases, 403 forbidden errors will occur in both “LocalHost” and “PhpMyadmin”. In this tutorial, we will explain how to solve the errors for both.

Solution to fix 403 forbidden error in Localhost

Quick Steps:

  • Open httpd.conf
  • Find text in <Directory/>  </Directory> having Deny from all and replace with Allow from all
  • Also find this code:  Order Deny, Allow, Deny from all, Allow from 127.0.0.1
    and replace with Order Deny, Allow Deny from all, Allow from all
  • Now restart all services of the wamp server
  • Click on localhost or goto default browser and write localhost and it will start working

Detailed Steps to fix the error:

Step 1

Open “httpd.conf” file from below path.

C:\wamp\bin\apache\apache2.2.22\conf\httpd.conf (You need to locate your drive where you have installed wamp. In this case, we have installed wamp in C drive)

Or

Open from Task Bar Icon

httpd config file location

Left Click on Wamp Server Icon => Apache =>httpd.conf

Step 2

Find this lines from httpd.conf file

<Directory/>
Options FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all

</Directory>

And replace it with

<Directory/>
Options FollowSymLinks
AllowOverride None
Order deny,allow
Allow from all

</Directory>

Step 3

Also find these code in httpd.conf file

Order Deny,Allow
Deny from all
Allow from 127.0.0.1

And replace it with

Order Deny,Allow
Deny from all
Allow from All

Save the file and close it.

Step 4

Then go to Wamp Server Icon, Right click on it and Press Restart All Services. See below image:

Wamp restart all services

Step 5

In Wamp Server  click on Localhost as show in below image

Start local host

OR goto your default web browser and write “Localhost” at URL

Its Done !

forbidden error solution

Solve 403 Forbidden Error in PhpMyAdmin

phpmyadmin errorHere is the simple solution of Forbidden error in while you are accessing Phpmyadmin in your wamp server.

Quick Steps:

  • Open phpmyadmin.conf file
  • Find this code:  Order Deny, Allow, Deny from all, Allow from 127.0.0.1
    and replace with Order Deny, Allow, Deny from all, Allow from all
  • Save the file and restart all services
  • Now access PhpMyadmin from your wamp server or directly access from the default browser
  • Its done!

If you are looking for detailed steps to fix this error, follow below guidlines.

Step 1

Open “phpmyadmin.conf” file from below path (first locate your wamp installation. In our case, we have installed them in C drive)

C:\wamp\alias\phpmyadmin.conf

Step 2

In that file, you will find two similar source code in which you need to edit small portion explain below. Make sure you edit both source codes.

Find this Code

Order Deny,Allow
Deny from all
Allow from 127.0.0.1

And replace it with

Order Deny,Allow
Deny from all
Allow from all

Step 3

Now follow step 4 explained in above solution in which you need to restart all services from your wamp.

Step 4

Now, start your wamp server and click on phpmyadmin as shown in below image.

start phpmyadmin

After successfully editing code and specified file, you will see below console in your web browser:

phpmyadmin

If you are still getting same error or need any other resolution, don’t hesitate to write here by comment. I will show you how to fix those errors in easy way.

403 Forbidden error on local network

Recently we received a comment from a user facing issue while accessing wamp on PC connected though local network. Here is the exact query from Vikram:

I have established a network using D-Link router. I don’t have a problem accessing WampServer instance from the machine where it is installed(say, Machine A). But, if I try to launch providing say; http://<ip-address-machine a=””> from another machine (say, Machine B)
I am getting Forbidden error. I could ping from machine B to Machine A.
Tried playing around httpd.conf … having ‘Allow from all’.
Do you have any hint for this ?

Solution:

Later, Vikram has suggested the solution to this 403 forbidden error while accessing wamp on network device. You can resolve this issue by editing ‘httpd-vhosts.conf’ file:

Change 'Require local' to 'Require all granted'.

Niraj Bariya is working as Online Marketing Professional in IT Industry having over 3 years of experience. Niraj Bariya loves to write about technologies, gadgets & reviews and online marketing.

36 Comments
  • Charis

    thank you very much, as a beinner in php, i have been struggling to get it started for a week and your article finally got me going somewhere. Great job 🙂

  • Pradeep Mehta

    thank you very much for your help.

    • Your Welcome Pradeep ! Please share this solution to your social media channels so other people will also get the solution !

  • Raghuraman Koteeswaran

    Thanks a lot!! helped me at the right time

  • Jithil

    Thank you very much..!!

  • suresh varma

    I am able work with localhost and ip @localsystem but when i am using network system i am getting

    403 forbidden error
    Please tell me some solution how to overcome with this error

    • You need to change the security setting on Apache to allow access from anywhere else, so edit your httpd.conf file.

      Change this section from :

      # onlineoffline tag – don’t remove
      Order Deny,Allow
      Deny from all
      Allow from 127.0.0.1
      Allow from ::1
      Allow from localhost
      To :

      # onlineoffline tag – don’t remove
      Require local
      Require ip 192.168.0

      Hope it help.

  • Pradosh Soni

    Thank you so much to help , I was facing this problem since long time and that really helped me.

    • Hi Pradosh ! Your welcome, I am really happy it solved your problem.

  • Freddob

    Thanks for the clear help – greatly appreciated! Now all is working well!

  • rizi jk’z

    Thanks You VERY MUCH..s really cool information
    it

  • wamuyu mwangi

    Thank you!!

  • suganya

    Thank you very much…really I very disturbed because of this error.

    This idea given for me nice guidance

  • Tony vonArx

    Wow, this was just what I was looking for when Google Chrome and the Opera browser started to refuse LocalHost access while Firefox, Safari and IE were working as usual! Thanks a lot.

  • Thanks a lot….. 😉

  • vinod

    I had same problam 403 Forbidden Error, Thanks for solving.

  • អ៊ុក តារា

    Thank!

  • Fazlulhaq

    thank you so much to help us…..thanks alot

  • freesonglyrics

    Hi i have installed wamp server in online windows server. I have changed
    the port and opening the website through IP address of server and now i
    want to open phpmyadmin which is showing the following message.

    Forbidden

    You don’t have permission to access /phpmyadmin/
    on this server.

    Apache/2.4.9 (Win64) PHP/5.5.12 Server at 85.214.144.111 Port __

    i have applied the above changes in the phpmyadmin.config but still it is not showing the phpmyadmin page.

    Phpmyadmin is opening well on the server ( from localhost as well as IP too).
    Kindly help me in this problem.

  • innocent devil

    How can i open .conf file ?

  • After making this change, for me WAMP server would not start again but would remain in “orange” state.

    Instead of:

    It should be:

    [code][/code]

    Note the space. This fixed the orange state for me.

  • Srinivasa Reddy Bonam

    Thank you…!!!!

  • Maggz

    Kindly assist, mine still didnt work.

  • Mary Kiruba Rani

    Thank You…. It works…..

    • Happy to help! Stay tuned for more of such tips at DigiFloor

  • lalit

    Hi Niraj, I have the same problem but I dont have any wamp server software installed on my PC. Can I fix this? reply me soon

  • Monika Gautam

    Thanks a lot !!!

  • Vikram Deshmukh

    Hi Niraj

    I have established a network using D-Link router. I dont have a problem accessing WampServer instance from the machine where it is installed(say, Machine A). But, if I try to launch providing say; http:// from another machine (say, Machine B)
    I am getting Forbidden error. I could ping from machine B to Machine A.
    Tried playing around httpd.conf … having ‘Allow from all’.
    Do you have any hint for this ?

    • Vikram Deshmukh

      Hi … Got it resolved. I am required to edit ‘httpd-vhosts.conf’.
      Changed ‘Require local’ to ‘Require all granted’.

  • PRASHANT SINGH

    Changing vhosts.conf would certainly resolve the issue .

    But other users who use the web link to access the application running on a diff machine can also manipulate the other files in that folder which may result in security breach.

    Is there a possible solution that you may provide for this.

  • Atilla

    Thank you soooo much Niraj! After I read so many articles, this is the only article that helped me. So well explained. Thanks!

  • Elias Ramadan

    hello,i need to download images from server every thing is correct in my code in android studio when i run the application the image dont download and dont give any error i think the problem is from httpd.conf can you help me please

To Top