配置文件如下
worker_processes 1;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
server {
listen 80;
server_name localhost;
charset gbk,utf-8,;
autoindex on;
location / {
root html;
index index.html index.htm;
}
location /d/ {
alias D:/logs/;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}
}
英文路径没有问题,但是一访问中文路径,就会出现这样:
error.log报错:
2018/01/11 22:26:21 [error] 14612#10464: *21 "D:/logs/中文/index.html" is not found (3: The system cannot find the path specified), client: 127.0.0.1, server: localhost, request: "GET /d/%D6%D0%CE%C4/ HTTP/1.1", host: "localhost", referrer: "http://localhost/d/"
D:/logs/中文/index.html这个文件有没有都会这样报错