'Forbidden you don't have permissions to access on server...' from remote compute and yet working on localhost
I am getting the following error when i try to access a file via apache server at a url
Forbidden you don't have permissions to access on server.
I have changed the directory settings to the following and restarted the server.
<Directory /> Options FollowSymLinks AllowOverride None Order deny,allow Deny from all </Directory>
Note: My instance was installed as part of WAMP package and i am on a win10 machine, local.
Any ideas what this could be? File permissions at OS level?
Update: i can hit the url of file from local browser but not remotely eg from mobile phone.
This was complicated by fact that after apache 3 you dont need to change the 'httpd.conf' to solve this issue but go to httpd.vhosts.conf and change 'Require Local' to 'Require all granted' to allow remote access as below
<VirtualHost *:80> ServerName localhost DocumentRoot c:/wamp64/www <Directory "c:/wamp64/www/"> Options +Indexes +Includes +FollowSymLinks +MultiViews AllowOverride All Require all granted </Directory> </VirtualHost>
I had the same problem after I moved to Vultr as my new VPS from VPSie with a Ubuntu 18 setup. I'd my webroot in my $HOME/www directory. It's not a production system, just for my development purposes.
I edited the apache2.conf file and added the following. After restarting Apache it fixed the issue.
sudo vi /etc/apache2/apache2.conf <Directory /home/YourUserName/www/> Options Indexes FollowSymLinks AllowOverride All Require all granted </Directory>
Replace "/home/YourUserName/www/" with your own directory. That fixed the problem.
goto apache(in taskbar)/httpd.vhosts.con
<Directory "e:/wamp64/www/"> Options +Indexes +FollowSymLinks +MultiViews AllowOverride All require all granted </Directory>
and restart the wampserver
- That is not the full error message you get. Something is missing. Please post the full error message you get.
- Apart from that: your host configuration specifically denies all access to everything:
Deny from all
- Not much more....Forbidden You don't have permission to access /dir/image.png on this server. Apache/2.4.23 (Win64) PHP/5.6.25 Server at 192.168.1.29 Port 8082
- Which is something different, isn't it? Why do you think posting parts of an error message is a good idea? Apart from this: I think my last comment answers your question.
- If it is Apache 2.4+, you should be using
Require all grantedinstead of
Deny/allowdirectives. As to the question, @arkascha 's 2nd comment is all that is needed.