下载nginx brew install nginx 在下添加并执行 emacs /user/local/etc/nginx/nginx.conf server{ listen 5000; /监听端口 location / { root /Users/sysadmin/Desktop/apidoc/doc/; /文件路径 index index.html /文件名; } } 重新加载nginx sudo nginx -t sudo nginx -s reload