在本地主机的NGNIX中重定向

问题描述 投票:0回答:1

我想在浏览器中编写10.10.0.0时,它带我索引页。但它没有我尝试过

server {
  listen 8080;
    server_name 10.10.0.0;
     return 301 http://localhost:8080/index.html;
    }
python nginx docker-compose nginx-location nginx-config
1个回答
0
投票
server { listen 8080; server_name 10.10.0.0; location / { return 301 http://localhost:8080/index.html; } }
© www.soinside.com 2019 - 2024. All rights reserved.