nginx.conf如下:
http {
server {
listen 8080;
server_name example.com;
root /tmp/test/example;
location / {
index index.html;
try_files $uri /test.html;
}
}
}
Run Code Online (Sandbox Code Playgroud)
当我访问时example.com:8080,它访问/tmp/test/example/test.html,而不是index.html.
| 归档时间: |
|
| 查看次数: |
5059 次 |
| 最近记录: |