25
votes
Accepted
Nginx doesn't have permission to access files with the same ownership
The nginx user is not able to traverse the filesystem to reach the folder where you have placed your site. A user must have the execute (+x) permission on a folder in order to be able to traverse it. ...
8
votes
Nginx-Always return 403 status code
Your location / {}, containing a return 403; matches first. You should move it below two others.
Happy leg shooting !
8
votes
Accepted
nginx 403 when serving static files + reverse proxy
That's because the directory exists, and therefore the try_files check
try_files $uri $uri/ @proxy;
succeeds. But there is no directory index file (typically index.html, see index), and autoindex is ...
5
votes
5
votes
Accepted
Nginx redirect all 403 to 404?
The nginx documentation clearly says that if you want to change the response code, you use =response. For example:
error_page 403 =404 /url;
Note that making this change requires specifying a URL to ...
5
votes
Hide Physical Path in IIS HTTP Error
I had to adjust the tag:
<httpErrors errorMode="DetailedLocalOnly" />
This is inside the "system.webserver" tag. Mine was previously set to "Detailed"
https://docs.microsoft.com/en-us/iis/...
3
votes
NginX - allow - custom error page
OK, the sollution was to create not just a custom error page option, but an error page location as well. So I just had to add:
error_page 403 /40x.html;
location = /40x.html {
...
3
votes
Accepted
403 Forbidden Errors with IIS Performance and Caching Configuration
Thank you @LexLi..
The suggestion to look into IIS logs got me moving again. From here, I was able to find a forum post that seemed relevant (https://forums.iis.net/t/1192952.aspx) because it showed ...
3
votes
Lighttpd static file server 403 forbidden error
Another frequent issue is an active SELinux on the machine.
Even with correct permissions on the directory tree, you will still get a 403 if the directory wasn't registered in SELinux.
chcon -R -h -t ...
3
votes
Accepted
How to tell Apache to reply with 403 instead of 401?
I think what you want is AuthzSendForbiddenOnFailure:
AuthzSendForbiddenOnFailure On
Context: directory, .htaccess
If authentication succeeds but authorization fails, Apache HTTPD will ...
3
votes
Accepted
Nginx writes error log entries to access.log
error.log contains detailed information about errors that happen on the server side, that is, HTTP error codes 5xx and other startup / internal errors.
It is not meant for logging all HTTP error ...
3
votes
Looking for a systematic approach to resolve a 403 error
A systematic approach to investigating 403 errors
Read the manual
HTTP 403 is an HTTP status code meaning access to the requested resource is forbidden. The server understood the request, but will ...
2
votes
Some IP addresses getting security or 403 errors when trying to access the site
Your web site is not accessible to users who have IPv6, (about a quarter of the US and close to 10% worldwide, and growing) because your DNS records point to an IPv6 address which does not correspond ...
2
votes
Accepted
403 on new apache2 installation
I will suggest to
apt-get purge apache2
And after that, remove the /etc/apache2 directory completely for clean any custom config.
Now with apache "cleaned" reinstall it again using:
apt-get ...
2
votes
Accepted
Directory listing isn't working on nginx showing 404 error
I eventually found the solution myself!
So to specify the location with root, you're going to have to specify the parent directory instead of the directory that you're planning to serve.
So as in my ...
2
votes
Accepted
Exchange Autodiscover not working 403, but can open Externally
The most reason why you got a invalid SSL certificate during auto discover is the following:
The ssl certificate you are using is selfsigned and not trusted externally
You are doing any http ...
2
votes
Block googlebot on a specific page using nginx
Why not just use robots.txt ? -> https://support.google.com/webmasters/answer/6062596
In my nginx logs googlebot user agent is just googlebot/2.1 or "Googlebot/2.1 (+http://www.googlebot.com/bot.html)...
2
votes
How do I prevent access on the web to a txt file on my server? i want it to still work, as its for a wizard. But i dont want people to access my code
they keep showing me how to password protect it, and when i try that route, the text files no longer work on my wizard.
That implies that the client needs to be able to access the .txt files for your ...
2
votes
Display custom error page
With a statement like the following (e.g. in the server block) where /403.html refers to your error page you want to display.
error_page 403 /403.html;
https://nginx.org/en/docs/http/...
2
votes
NGINX Not showing directory contents
You will want to confirm that autoindex is on in for the location you've defined in nginx.conf. You don't give your config, but it seems like you'd want something like
location / {
autoindex on;
...
2
votes
How to identify cause of error 403 on JBoss WildFly server?
Add this block to standalone.xml in subsystem urn:jboss:domain:logging:3.0:
<logger category="org.jboss.security">
<level name="TRACE"/>
</logger>
Restart server, so it picks up ...
2
votes
403 Forbidden on initial load after installing NextCloudPi
Answer is in the original post but I am posting it again here
Problem
Initial load after installing NextCloudPi resulted in 403 because the IP address of the nextcloudpi install was custom and did ...
1
vote
Accepted
Error 403 (access denied) with updated .htaccess file
Where are you denying access? That would seem to be the problem. I suspect you are still denying access with the "old" Apache 2.2 directives elsewhere in your Apache config and this is taking ...
1
vote
Accepted
403 error trying to access file on Apache server
You seem to be placing your website files and DocumentRoot in a /home/user sub-directory:
DocumentRoot /home/username/var/www/example.com/public_html
Usually, Apache works in /var/www, you might ...
1
vote
nginx error_page configuration
I do not have the reputation to comment. The location line for the 403 should not have an equals sign.
i.e. location = @error403 { should be location @error403 {
The syntax for the commands you are ...
1
vote
Hide Physical Path in IIS HTTP Error
You can modify web.config.xml even as far as to creating custom error pages.
<!-- CUSTOM ERROR MESSAGES
Set customErrors mode="On" or "RemoteOnly" to enable custom error messages, "Off" to ...
1
vote
Accepted
Phppgadmin: 403 Forbidden
I continued to fiddle with the Apache configuration and I replaced:
<Directory /usr/share/phppgadmin>
DirectoryIndex index.php
Order deny,allow
Allow from all
</Directory>
by
...
1
vote
Nginx 403 forbiden with the good rights set on files
Add this:
location / {
index index.htm index.html index.php index.py index.cgi index.sh;
}
http://nginxlibrary.com/enable-directory-listing/
1
vote
How to fix access to the requested resource which has been denied for Tomcat webapp?
Make sure the user which is running the tomcat has access to the folder where FreeShim is located.
sudo chmod -R a+rwx < dir of FreeShim >
This worked for me.
1
vote
Accepted
Is it possible to set the Status-Line header with Apache's Header directive?
The Header directive can only be used to set HTTP headers. I'm afraid the first line of the repsonse from an HTTP request is not actually an HTTP header and so cannot me modified as such.
A possible ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
http-status-code-403 × 239apache-2.2 × 77
nginx × 53
apache-2.4 × 32
.htaccess × 20
forbidden × 20
virtualhost × 16
ubuntu × 14
http-status-code-404 × 14
centos × 11
permissions × 10
linux × 9
wordpress × 9
iis × 8
configuration × 8
iis-7 × 8
php × 7
http × 7
apache2 × 7
web-server × 6
reverse-proxy × 6
redirect × 6
httpd × 6
debian × 5
mac-osx × 5