I just set up an nginx server. I can visit my webpage ( an "under construction" page ), but although one image is server properly by the server ( named "logo.png" ), another image on the same directory ( I have everything under the root directory of nginx ) is not served and throws a "403 - Forbidden" error ). Below I show you the "http" part of my nginx.conf file.
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
server {
listen 80;
server_name ***********.com;
root html;
location / {
index index.html index.htm;
}
}
}
Do you have any suggestions about how I might solve this??
Many times the 403 error is temporary, and a simple refresh might do the trick. Most browsers use Ctrl+R on Windows or Cmd+R on Mac to refresh, and also provide a Refresh button somewhere on the address bar.
Probably nginx-user does not have rights to read second file. Options:
1) change chmod of that file so it can be read by everyone
2) add nginx-user and file-owner-user to the same group and allow group to read that file
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With