Nginx 403 Forbidden Error

I am trying to configure graphite to work with grafana in docker based on this project: https://github.com/kamon-io/docker-grafana-graphite

and when I run my dockerfile, I get a 403 Forbidden error for nginx.

my configurations for nginx almost match the project configurations. I run my docker files on a server and test them on my Windows computer. So the configurations are not exactly the same ... for example, I have:

server {
listen 80 default_server;
server_name _;
location / {
  root /src/grafana/dist;
  index index.html;
}
location /graphite/ {
    proxy_pass                 http:/myserver:8000/;
    proxy_set_header           X-Real-IP   $remote_addr;
    proxy_set_header           X-Forwarded-For  $proxy_add_x_forwarded_for;
    proxy_set_header           X-Forwarded-Proto  $scheme;
    proxy_set_header           X-Forwarded-Server  $host;
    proxy_set_header           X-Forwarded-Host  $host;
    proxy_set_header           Host  $host;

    client_max_body_size       10m;
    client_body_buffer_size    128k;

    proxy_connect_timeout      90;
    proxy_send_timeout         90;
    proxy_read_timeout         90;

    proxy_buffer_size          4k;
    proxy_buffers              4 32k;
    proxy_busy_buffers_size    64k;
    proxy_temp_file_write_size 64k;

    add_header Access-Control-Allow-Origin "*";
    add_header Access-Control-Allow-Methods "GET, OPTIONS";
    add_header Access-Control-Allow-Headers "origin, authorization, accept";
}

But I still continue to ban. Checking the error log for nginx says:

 directory index of "/src/grafana/dist/" is forbidden

Stopping and starting it again, he says:

 directory index of "/src/grafana/dist/" is forbidden

I am very new to nginx ... was wondering if there was anything in the configurations that I misunderstood.

Thanks in advance.

+4
2

, , .

+8

'/' 'index.html' '/src/grafana/dist'.

, : 1. 'index.html' . 2. . nginx , "index.html". 'src', 'src/grafana' 'src/grafana/dist', 'index.html'. "sudo chmod -R 755/src", .

+2

All Articles