1. 多个二级目录配置history # 多个二级目录配置history location ~ /abc/(\w*)?/ { root /opt; index index.php index.html index.htm; # nginx conf location调试 # add_header Content-Type "text/plain;charset=utf-8"; # return 200 /khtg/$1/index.html; try_files $uri $uri/ $uri/index.html /abc/$1/index.html; }