server {
listen 8888 default_server;
server_name _;
root /usr/local/webserver/; #/usr/share/nginx/html;
# Load configuration files for the default server block.
include /etc/nginx/default.d/*.conf;
location ~ /$ {
autoindex on;
autoindex_localtime on; #之类的参数写这里
autoindex_exact_size off;
}
location ~ /.+\.xml$ {
#add_header Content-Type "text/html;charset utf-8;";
#default_type text/xml;
}
location ~ /.+ {
add_header Content-Type "text/plain;charset utf-8;";
}
error_page 404 /404.html;
location = /40x.html {
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
}
}
网友评论