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. ...
Carcer's user avatar
  • 1,007
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 !
drookie's user avatar
  • 8,759
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 ...
Maxim Dounin's user avatar
  • 3,666
5 votes

iis 8 - 403 access is denied

Here's how I got my IIS fixed after getting random 403's all over.
paul-2011's user avatar
  • 165
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 ...
Michael Hampton's user avatar
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/...
archangel76's user avatar
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 { ...
Bert's user avatar
  • 1,066
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 ...
Adam's user avatar
  • 43
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 ...
NoiseInTheDark TM's user avatar
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 ...
Dan Lowe's user avatar
  • 248
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 ...
Tero Kilkanen's user avatar
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 ...
HBruijn's user avatar
  • 80.3k
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 ...
Michael Hampton's user avatar
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 ...
Cristian Deluxe's user avatar
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 ...
Samm's user avatar
  • 41
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 ...
BastianW's user avatar
  • 2,888
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)...
Skamasle's user avatar
  • 447
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 ...
Joseph Sible-Reinstate Monica's user avatar
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/...
Sven's user avatar
  • 99.5k
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; ...
Jack Brooks's user avatar
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 ...
user1438038's user avatar
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 ...
Aaron Welborn's user avatar
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 ...
MrWhite's user avatar
  • 13k
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 ...
Leo Gallego's user avatar
  • 1,933
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 ...
Shane L's user avatar
  • 31
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 ...
Chris's user avatar
  • 76
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 ...
MBR's user avatar
  • 141
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/
Marcel's user avatar
  • 1,790
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.
Shekhar Sahu's user avatar
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 ...
Unbeliever's user avatar
  • 2,356

Only top scored, non community-wiki answers of a minimum length are eligible