カテゴリー:
学習
閲覧数:275 配信日:2018-04-27 10:39
13: Permission denied
sock failed (13: Permission denied)
・nginx error connect to php5-fpm.sock failed (13: Permission denied)upstream timed out (110: Connection
upstream timed out (110: Connection
・nginx でupstream timed outエラーが発生した時の対処・nginxのタイムアウトエラー(upstream timed out (110: Connection timed out) while reading response header from upstream)
その他エラー履歴
502 Bad Gateway
504 Gateway Time-out
.sock failed (111: Connection refused)
vi go-demo.w4c.work.conf
server {
listen 80;
server_name go-demo.w4c.work
location / {
fastcgi_pass unix:/var/run/go-fcgi.sock;
include fastcgi_params;
}
}
root /var/www/◇◇/w4c.work/go-demo.w4c.work;
index index.php index.html index.htm index.go;
2018/04/27 09:26:36 [crit] 22015#22015: *1 connect() to unix:/var/run/go/go-fcgi.sock failed (2: No such file or directory) while connecting to upstream, client: IPアドレス, server: go-demo.w4c.work, request: "GET /index.go HTTP/1.1", upstream: "fastcgi://unix:/var/run/go/go-fcgi.sock:", host: "go-demo.w4c.work"
パーミッションの問題
▼/main.go
・「Hellow World!」が表示された
・なぜ?
▼/indesx.go
・「Hellow World!」が表示された
テキスト内容を変更したら、二度と表示されなくなる
・恐らくパミッションの問題
・現状では、ソケットファイルはrootで作成される
・そのままではエラーになるため、nginxユーザへ変更する
・問題は、次にgoファイルを変更した際
・反映されなくなる。恐らくパミッションの問題。よく分かっていない
・Goでソケットファイル作成する際、nginxユーザかつパミッション777で作成したい