Windows nginx The system cannot find the file specified
129 CreateFile() "XXXX.png" failed (2: The system cannot find the file specified), client: 218.92.227.188, server: zhlhtgxj.com, request: "GET XXX.png HTTP/1.1", host: "X", referrer: "http:Xapgis.html?extlayer=true"
以下为配置文件
#user nobody;
#CPU的内核数量,可设置为低于内核数量的值
worker_processes 8;
error_log logs/error.log;
events {
# 活动请求连接数
worker_connections 10240;
}
http {
include mime.types;
default_type application/octet-stream;
fastcgi_buffers 256 16k;
fastcgi_buffer_size 128k;
fastcgi_connect_timeout 3s;
fastcgi_send_timeout 120s;
fastcgi_read_timeout 120s;
fastcgi_busy_buffers_size 256k;
fastcgi_temp_file_write_size 256k;
client_header_buffer_size 32K;
large_client_header_buffers 4 32K;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"'
'$request_time $upstream_response_time' '$upstream_status $upstream_addr $http_host';
client_max_body_size 500m;
sendfile on;
keepalive_timeout 65;
lua_package_path "$prefix/?.luac;$prefix/?.lua;;";
# 负载均衡分流
upstream testNginx{
server 127.0.0.1:8080 weight=1;
server 127.0.0.1:8081 weight=1;
}
upstream fastcgi_proxy_branch1 {
server 127.0.0.1:9002;
}
upstream fastcgi_proxy_branch2 {
server 127.0.0.1:9004;
server 127.0.0.1:9005;
}
server {
listen 8000;
server_name X.com;
#允许跨域请求
add_header 'Access-Control-Allow-Origin' *;
location / {
root docs; # 项目根目录
try_files $uri $uri/;
}
error_page 404 /nfound.html;
location = /nfound.html {
root docs/web/public/nfound;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
# php的cgi进程配置 端口为默认为9000
location ~ \.php$ {
root docs_base;
index index.html index.htm;
proxy_pass http://testNginx; #负载均衡
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
add_header Access-Control-Allow-Origin *;
if ($request_method = 'OPTIONS') {
return 204;
}
}
}
然后启动方式为bat脚本启动,使用
start %cd%/nginx.exe -p %cd%
但是启动之后访问一个不存在的文件后出现了
CreateFile() "XXXX.png" failed (2: The system cannot find the file specified)
发现了不了问题,还请知道的大神麻烦解答一下。
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论