AH01630: client denied by server configuration but require all granted is set (Apache 2.4, CentOs) - apache

I am using Apache 2.4 on CentOs to power my website. However, I always get a 403 forbidden error when trying to access the website through my browser. When I consulted the file error_log in the log directory of /etc/httpd, I repeatedly see the error:
AH01630: client denied by server configuration
I have read in the Internet as well as in multiple StackOverflow questions that you can solve this error with Require all granted in the html directory configuration of the httpd.conf file (/etc/httpd/conf/).
I have configurated this directory (through which I am hosting my website) like recommended above (it was already configurated). The error persists, so there must be another problem in the server configuration that denies access to my website. My httpd.conf file is not changed at all, it is the default file that gets downloaded when installing Apache 2.4. Does anybody know why this error occurs? Can somebody explain to me what else can cause this error? I have looked everywhere in the internet for this error (links below) but nothing could help me at this problem.
I have no .htaccess file in my website. Only an index.html file to test it.
Stack Overflow Question: "Apache2: 'AH01630: client denied by server configuration'"
Apache Wiki
Serverfault

I just deleted the whole HTTPD configuration and then reinstalled Apache. I had to enable PHP too by using these lines of code:
<FilesMatch \.php$>
SetHandler application/x-httpd-php
</FilesMatch>
Then Apache worked flawlessly.

Related

prevent Access to Apache server web folder on EC2

Hi I have built a web platform on EC2 with apache as my web server
I want to prevent access to my web folders
In case someone trying to do www.mywebsite.com/include or www.mywebsite.com/includes/images
I want him to be blocked
I understood I have to create Htacces file with some rule
I have tried that with no success.
If someone have good knowledge Ill to have a tutorial in case the answer won't be enough
Thanks
I all ready described above
You can use the directive Location or Directory, you can have more information on the Apache documentation: Documentation
Below is the block code for Apache 2.4.X
<Location /include>
Require all denied
</Location>
<Location /includes/images>
Require all denied
</Location>

Apache : Directory is still accessible even though options -index is specified

I have OHS 11g with apache 2.2 bundled with it. In OHS home, there is folder "icons" and sub folder "small" which are accessible through http request. To disable browsing on these directories, I have included below setting in httpd.conf and restarted the server. But still these 2 folders are accessible from UI. How to resolve this?
Options -Indexes
Appreciate your help!
Can you use .htaccess file?
Make sure file reads:
order deny,allow
deny from all
allow from [your.IP]
then just 'service apache2 restart'

Forbidden You don't have permission to access / on this server

I'm trying to set up a webserver on my VPS (Running Debian 7). I have installed apache and configured it. However, when I try to connect to my IP I am faced with a 403 forbidden error saying that I don't have access to / on the server. I have attempted to set it up so that when connecting the webserver should direct to the directory: /home/webmaster/website. My main apache.conf file is as follows: http://pastebin.com/zgyik39y
and my site config, called "web.conf" is: http://pastebin.com/jpRJAaCw I don't know what to do, I've tried many suggestions on here and in other places and none so far have worked.
Line 18 of web.conf should be:
Allow from all
For apache 2.2 or:
Require all granted
For apache 2.4

REST request in Apache failing with "client denied by server configuration"

We have upgraded to Apache 2.x and Tomcat 7.x recently and seeing this issue.
Our Rest enabled Web services are deployed in Tomcat.
RESTful API's require hierarchical URI's that have nothing to do with directory structures on a filesystem. e.g. http://mycomp.com/product/123.
All the GET requests are working fine but when we try to use PUT/DELETE/POST etc, client is thrown out with "403 Forbidden" error, and Apache error.log shows : "client denied by server configuration"
I have checked httpd.conf file and it has <Directory> block with "Allow all" access.
The issue has been resolved by updating <LimitExcept GET POST> element.

403 error on .exe files apache

I have an apache webserver running on centos environment. There is a folder and in that there is a file which has an extension .exe lets name the file x.exe
when I try download this file using http://mysite.com/folder/x.exe I get a 403 error.
but if I add a gif to that folder it works http://mysite.com/folder/pic.gif
I dont have SSH access to this server but need to know some clue for why this is happenning, the file permissions are correct too.
any help is appreciated
Within Apache's httpd.conf, it is possible to specify default handling actions for certain file types or paths. It may be that your server is configured to block executable files all together. Similar blocking can also occur in an .htaccess file. There are a few ways to do it... here's one:
<Files ~ "\.exe$">
Order allow,deny
Deny from all
</Files>
That little snippet could be in the main .conf file, and included .conf file, OR an .htaccess file (or all three!), and again, that is just one possibility. Your best bet is to check out the server logs. They will indicate why a given request was denied in a form similar to this:
[Wed Oct 11 14:32:52 2000] [error] [client 127.0.0.1] client denied by
server configuration: /www/root
Take a look at this document for information about server logs (including default paths to the logs themselves).
As I mentioned, there are a few other ways to block access to certain file types, certain files, certain folders, etc. Without looking at the error logs, it is very difficult to determine the cause. Further, without full access to the server, it may not be possible to alter this behavior. This blockage could be in place as a matter of policy for your web host.
I'd like to add I spent like 2 hours trying this crap over and over again only to discover that selinux was denying specific file types for httpd.
try:
setenforce Permissive
and see if that corrects the error
tag
Fedora 16
well the answer was I had this in a folder where it forbids the exe
Deny from all
<FilesMatch "\.(html|HTML|htm|HTM|xhtml|XHTML|js|JS|css|CSS|bmp|BMP|png|PNG|gif|GIF|jpg|JPG|jpeg|JPEG|ico|ICO|pcx|PCX|tif|TIF|tiff|TIFF|au|AU|mid|MID|midi|MIDI|mpa|MPA|mp3|MP3|ogg|OGG|m4a|M4A|ra|RA|wma|WMA|wav|WAV|cda|CDA|avi|AVI|mpg|MPG|mpeg|MPEG|asf|ASF|wmv|WMV|m4v|M4V|mov|MOV|mkv|MKV|mp4|MP4|swf|SWF|flv|FLV|ram|RAM|rm|RM|doc|DOC|docx|DOCX|txt|TXT|rtf|RTF|xls|XLS|xlsx|XLSX|pages|PAGES|ppt|PPT|pptx|PPTX|pps|PPS|csv|CSV|cab|CAB|arj|ARJ|tar|TAR|zip|ZIP|zipx|ZIPX|sit|SIT|sitx|SITX|gz|GZ|tgz|TGZ|bz2|BZ2|ace|ACE|arc|ARC|pkg|PKG|dmg|DMG|hqx|HQX|jar|JAR|xml|XML|pdf|PDF)$">
Allow from all
</FilesMatch>
added exe there and worked fine,
also a note, this was in a SilverStripe CMS powered site, and in the assets folder of SilverStripe