
容器中的 80 映射到主机 55555 端口,配置了一个文件目录 inedx
server { listen 80; # server_name localhost:80; location /files { root /home; autoindex on; autoindex_exact_size off; autoindex_localtime on; expires 30d; } } 现在外部访问 http://192.168.6.235:55555/files/ 正常访问, 但访问 http://192.168.6.235:55555/files 就跳转到 http://192.168.6.235/files/ (另一个容器的应用), 请问要如何解决
1 feverzsj 2018-03-11 18:29:40 +08:00 /files 不是路径,/files/才是 |
2 creedowl OP @feverzsj 那要如何做到访问 http://192.168.6.235:55555/files 自动跳转到 http://192.168.6.235:55555/files/ 呢 |
3 creedowl OP 有人吗。。 |
4 sajesemuy 2018-03-23 15:38:10 +08:00 ``` server_name localhost:55555; server_name_in_redirect on; ``` |