I am using apache 2.4 on amazon ec2.
I have server configuration in httpd.conf as below.
<Directory />
AllowOverride none
Require all denied
</Directory>
<Directory "/var/www/html">
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
But I am getting error AH01630: client denied by server configuration: in apache log console.
Also referfed too many article. They are giving same solution as above.
Please give me solution if any
I have a Mac OSX El Capitan operating system. Since my laptop has limited space, I am trying to set up a local server on my 1TB external hard drive with the url http://media.database/, and that uses PHP. I have set it up the best I know how, but when I go to the page, it says "Forbidden You don't have permission to access /index.php on this server."
I have set apache and host files as best I know how, but I'm still pretty new to this sort of thing. I have listed my updates to those files below and restarted the apache server using sudo apachectl restart, which has gotten me this far. Can someone enlighten me on what I might be missing. All help is greatly appreciated.
/etc/apache2/httpd.conf
<VirtualHost *:80>
ServerName media.database
DocumentRoot "file:///Volumes/DBTARA/media/"
<Directory "file:///Volumes/DBTARA/media/">
DirectoryIndex index.php index.html
AllowOverride all
Options -MultiViews
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
/etc/hosts
127.0.0.1 media.database
/etc/apache2/users/vmbmacintosh.conf
<Directory "file:///Volumes/DBTARA/media/">
AllowOverride All
Options Indexes MultiViews FollowSymLinks
Require all granted
</Directory>
/etc/apache2/httpd.conf
I attempted to add the following DocumentRoot after the one I already have, but that made my other local servers inaccessible and kept the external one as forbidden.:
DocumentRoot "file:///Volumes/DBTARA/media"
<Directory "file:///Volumes/DBTARA/media">
Options FollowSymLinks Multiviews
MultiviewsMatch Any
AllowOverride None
Require all granted
</Directory>
Thanks again in advance for any assistance.
I am using PHP 7.0.5 and Apache 2.4.20 and I would like to run Squirrelmail.
I am getting a 403 Forbidden error when I try to access any of the squirrelmail pages like HostName/squirrelmail, HostName/squirrelmail/src/login.php or HostName/squirrelmail/src/configtest.php ect.
In my httpd.conf I have:
Alias /squirrelmail /usr/local/squirrelmail/www
<Directory /usr/local/squirrelmail/www>
Options None
AllowOverride None
DirectoryIndex index.php
Order Allow,Deny
Allow from all
</Directory>
This is due to httpd 2.4 access control has changed from the previous version
the solution is as follows
Order allow,deny Allow from all
should be replaced by:
Require all granted
then restart httpd
systemctl restart httpd
You must check the log of Apache to solve the problem, in centos 7 the logs will be in tow pathes:
/var/log/httpd/error_log
Or
/var/log/httpd/ssl_error_log
In generally Apache vhost.conf file must contain this lines:
Alias /webmail /usr/share/squirrelmail
<Directory "/usr/share/squirrelmail">
Options Indexes MultiViews
Require all granted
AllowOverride none
Order allow,deny
Allow from all
Options +SymLinksIfOwnerMatch
DirectoryIndex index.php index.html index.htm
</Directory>
OK I am new to ASKING questions on stackoverflow, but I need to get this figured out. I have a VPS with Apache installed Running Ubuntu 12.04 LTS. I downloaded a php script which required php 5.4+ but I had 5.3 installed. Then I followed the instructions located at this link.
While doing the upgrade, the installer told me that my php.ini file was manually changed. I believe I did this in order to view the errors on screen with the "display_errors=on" variable a long time ago. I therefore selected the option to KEEP and USE the old version of php.ini. Once the installation was done and the apache server restarted. I went to my chrome browser and pressed "refresh" and to my dismay, "403 Forbidden".
Here is the conf file for the virtual server:
<VirtualHost *:80>
ServerAdmin webmaster#localhost
DocumentRoot /home/{usr}/Public/
# Indexes + Directory Root.
DirectoryIndex index.html index.shtml index.php
<Directory />
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
<Directory /home/{usr}/Public/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
ErrorLog /home/{usr}/Public/log/{server}/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog /home/{usr}/Public/log/{server}/access.log combined
Alias /doc/ "/usr/share/doc/"
<Directory "/usr/share/doc/">
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Allow from 127.0.0.0/255.0.0.0 ::1/128
</Directory>
</VirtualHost>
I obscured the username to {usr} and the folder to {server} to keep anonymity. This file was created BY ME, by putting it together with some other example file. I'm not sure if this is correct, all I know is that before this upgrade, everything was working fine!
I also "LL"'d the "Public" folder and here's what I found:
drwxrwxrwx 28 {usr} {usr} 4096 Sep 4 01:09 Public/
It seems that all the folders under it have the same permission. Please help and if there are any questions, feel free to ask. I've been doing this for many years but by no means would I call myself an "expert".
Thanks in advance.
Did you also upgrade Apache 2 ?
Apache 2.4 has a new user rights policy system : http://httpd.apache.org/docs/2.4/upgrading.html#run-time
Hi Friends previously I am using XAMP Server but when I install joomla Templates it creates alots of error. Now I installed the WAMP, but the issues are:
1. I can access with 127.0.0.1, but I cant access with "localhost".
2 When i access phpmyadmin i get this error.
Forbidden You don't have permission to access /phpmyadmin/ on this server.
Alias /phpmyadmin "c:/wamp/apps/phpmyadmin3.4.5/"
# to give access to phpmyadmin from outside
# replace the lines
#
# Order Deny,Allow
# Deny from all
# Allow from 127.0.0.1
#
# by
#
# Order Allow,Deny
# Allow from all
#
After changing, it will look like this
<Directory "c:/wamp/apps/phpmyadmin3.4.5/">
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Order Deny,Allow
Allow from all
</Directory>
After this just restart Wamp
Go to C:\wamp\alias. Open the file phpmyadmin.conf and change
<Directory "c:/wamp/apps/phpmyadmin3.5.1/">
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Order Deny,Allow
Deny from all
Allow from 127.0.0.1
</Directory>
to
<Directory "c:/wamp/apps/phpmyadmin3.5.1/">
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Order Allow,Deny
Allow from all
</Directory>
problem solved
Change httpd.conf file as follows:
from
<Directory />
AllowOverride none
Require all denied
</Directory>
to
<Directory />
AllowOverride none
Require all granted
</Directory>
So none of the above stuff worked for me. Except this:
edit httpd.conf,
find the line
Listen 80
and change to
listen 0.0.0.0:80
if you are running windows 8, its got something to do with using ipv6 instead of ipv4
Go to C:\wamp\alias.
Open the file phpmyadmin.conf and add
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Order Deny,Allow
Deny from all
Allow from 127.0.0.1
Allow from MACHINE_IP
Change in following file \bin\apache\apache2.2.22\conf\httpd.conf
Replace Listen 80 with Listen 0.0.0.0:80
Replace
<Directory />
Options FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
</Directory>
with
<Directory />
Options FollowSymLinks
AllowOverride None
Order deny,allow
Allow from all
</Directory>
Replace
onlineoffline tag - don't remove
Order Deny,Allow
Deny from all
Allow from 127.0.0.1
with
onlineoffline tag - don't remove
Order Deny,Allow
Allow from all
Allow from 127.0.0.1
in \wamp\alias\phpmyadmin.conf
replace
<Directory "c:/wamp/apps/phpmyadmin3.4.10.1/">
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Order Deny,Allow
Deny from all
Allow from 127.0.0.1
</Directory>
with
<Directory "c:/wamp/apps/phpmyadmin3.4.10.1/">
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Order Deny,Allow
Deny from all
Allow from 127.0.0.1
Allow from ::1
</Directory>
Tested on windows localhost.
Note : Please consider RigsFolly's comment also.
For WampServer 2.2 with Apache 2.4.2 I ended up with:
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Require local
To solve this, I opened httpd.conf and changed the following line:
Allow from 127.0.0.1
to:
Allow from 127.0.0.1 ::1
I faced this problem
Forbidden You don't have permission to access /phpmyadmin/ on this server
Some help about this:
First check you installed a fresh wamp or replace the existing one. If it's fresh there is no problem, For done existing installation.
Follow these steps.
Open your wamp\bin\mysql directory
Check if in this folder there is another folder of mysql with different name, if exists delete it.
enter to remain mysql folder and delete files with duplication.
start your wamp server again. Wamp will be working.
just add following line in wamp/alias/phpmyadmin.conf
Allow from ::1
so it will look something like this depending your phpmyadmin version.
<Directory "c:/wamp/apps/phpmyadmin3.5.1/">
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Order Deny,Allow
Deny from all
Allow from 127.0.0.1
Allow from ::1
</Directory>
If its possible uninstall wamp then run installation as administrator then change you mysql.conf file like that
<Directory "c:/wamp/apps/phpmyadmin3.5.1/">
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Order Allow,Deny
Allow from all
Allow from all
</Directory>
Not: Before I reinstall as admin the solution above didn't work for me
Change the file content of c:\wamp\alias\phpmyadmin.conf to the following.
<Directory "c:/wamp/apps/phpmyadmin3.4.5/">
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Order Deny,Allow
Allow from all
</Directory>
Here my WAMP installation is in the c:\wamp folder. Change it according to your installation.
Previously, it was like this:
<Directory "c:/wamp/apps/phpmyadmin3.4.5/">
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Order Deny,Allow
Deny from all
Allow from 127.0.0.1
</Directory>
Restart your Apache server after making these changes.
In your apache config file (../bin/apachex.y.z/cong/httpd.conf)
Just change
< Directory "c:/wamp/www/" >
...
...
"Require local" ===> "Require all granted"
< /Directory >
This allows other pc's to access (to read) your web folder.
I had done below changes for new phpmyadmin4.0.4 in httpd.conf file
<Directory />
AllowOverride none
Require all granted
</Directory>
and phpmyadmin.conf
<Directory "c:/wamp/apps/phpmyadmin4.0.4/">
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Order Allow,Deny
Allow from all
</Directory>
and restart my server.
None of the above answers worked for me, or where unsafe (as some pointed out, using Allow from all can make your files and data accessible to the outside world).
Open the c:\wamp\alias\phpmyadmin.conf file and change
Allow from 127.0.0.1
to
Allow from 127.0.0.1 ::1
Explanation:
On most computer systems, localhost resolves to the IP address 127.0.0.1, which is the most commonly used IPv4 loopback address, and to the IPv6 loopback address ::1 (source: https://en.wikipedia.org/wiki/Localhost)
The resolution of the name localhost into one or more IP addresses is configured by the following lines in the operating system's hosts file:
127.0.0.1 localhost
::1 localhost
to see your hosts file, go to c:\Windows\System32\drivers\etc\HOSTS
notice the above lines are commented out with the note: # localhost name resolution is handled within DNS itself.
On my machine, on Win7, I also noticed the following:
localhost\phpmyadmin did not work on Chrome, but worked on IE11
127.0.0.1\phpmyadmin worked on Chrome
comment Require local from httpd.conf
"#Require local"