Follow Us

Solved - Error 403 Forbidden, can not access Wamp server from Flutter real device

Click on the below button and follow us for instant updates of our feed


 You might face this error why trying to access wampserver on flutter or on localhost

SOLUTION:

For WAMPServer versions <= 2.5


By default Wampserver comes configured as securely as it can, so Apache is set to only allow access from the machine running wamp. Afterall it is supposed to be a development server and not a live server.


Also there was a little error released with WAMPServer 2.4 where it used the old Apache 2.2 syntax instead of the new Apache 2.4 syntax for access rights.

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


The Require local allows access from these ip's 127.0.0.1 & localhost & ::1.


The statement Require ip 192.168.0 will allow you to access the Apache server from any ip on your internal network. Also it will allow access using the server mechines actual ip address from the server machine, as you are trying to do.


WAMPServer 3 has a different method


In version 3 and > of WAMPServer there is a Virtual Hosts pre defined for localhost so you have to make the access privilage amendements in the Virtual Host definition config file


First dont amend the httpd.conf file at all, leave it as you found it.


Using the menus, edit the httpd-vhosts.conf file.



It should look like this :


<VirtualHost *:80>
ServerName localhost
DocumentRoot D:/wamp/www
<Directory "D:/wamp/www/">
Options +Indexes +FollowSymLinks +MultiViews
AllowOverride All
Require local
</Directory>
</VirtualHost>


Amend it to


<VirtualHost *:80>
ServerName localhost
DocumentRoot D:/wamp/www
<Directory "D:/wamp/www/">
Options +Indexes +FollowSymLinks +MultiViews
AllowOverride All
Require all granted
</Directory>
</VirtualHost>


Hopefully you will have created a Virtual Host for your project and not be using the wamp\www folder for your site. In that case leave the localhost definition alone and make the change only to your Virtual Host.


Dont forget to restart Apache after making this change


Click on the below button and follow us for instant updates of our feed




About Wakabia

    Blogger Comment
    Facebook Comment

0 comments:

Post a Comment

Download Real Estate E-book

Recent Comments