我試圖建立石墨根據這個項目在泊塢窗grafana工作:https://github.com/kamon-io/docker-grafana-graphitenginx的403禁止錯誤
,當我跑我的dockerfile我得到403 nginx的Forbidden錯誤。
我的nginx配置與項目配置幾乎一樣。我在服務器上運行dockerfiles並在我的Windows機器上測試它們。所以配置是不完全一樣的...例如我有:
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";
}
但我仍然不斷403獲得禁止。檢查錯誤日誌nginx的說:
directory index of "/src/grafana/dist/" is forbidden
停止並再次運行它,它說:
directory index of "/src/grafana/dist/" is forbidden
我很新nginx的......不知道是否有什麼東西在的配置,我誤解。
在此先感謝。
啊我明白了。我只是看了/ src/grafana/dist,沒有index.html。我假設我必須手動添加index.html文件? – 2014-12-04 21:26:41