location中配置如下

location / {    # 容许拜访文件目录    autoindex on;    # 按MB、GB展现文件大小, 配置on则按bytes展现文件大小    autoindex_exact_size off;    # 应用本地工夫    autoindex_localtime on;    # 文件门路    root   /www/wwwroot/www.walmart.com;}

server中配置编码

charset utf-8,gbk;

残缺配置

server {    listen       80;    server_name www.walmart.com;    root /www/wwwroot/www.walmart.com;    index index.html index.htm default.php default.htm default.html;    #charset koi8-r;    gzip on;    gzip_buffers 32 4K;    gzip_comp_level 6;    gzip_min_length 2K;     # 容许音讯头带_下划线     underscores_in_headers  on;    access_log  logs/walmart.access.log  combined;    charset utf-8,gbk;    location / {        autoindex on;        autoindex_exact_size off;        autoindex_localtime on;        root   /www/wwwroot/www.walmart.com;        index  index.html index.htm;    }}