Open () failed (2: No such file or directory)
When I ask for a link http://abc.example.com/images/default-thumbnail.jpg
, I get a 404 error while viewing the output log file[error] 1244#0: *1 open() "/tmp/upload-dir/images/default-thumbnail.jpg" failed (2: No such file or directory),
But in fact, this file is, and the authority is 777
[root@localhost nginx]# ll /tmp/upload-dir/images/default-thumbnail.jpg
-rwxrwxrwx 1 root root 7592 6月 21 2016 /tmp/upload-dir/images/default-thumbnail.jpg
Nginx config:
server {
charset utf-8;
client_max_body_size 128M;
sendfile off;
listen 80;
server_name abc.example.com;
access_log /www/abc/logs/nginx-access.log;
error_log /www/abc/logs/nginx-error.log;
root /tmp/upload-dir;
location /images/ {
autoindex on;
expires 30d;
}
location / {
proxy_pass http://localhost:8080;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
}
}
+3
source to share
No one has answered this question yet
Check out similar questions: