|
|
本帖最后由 formroot 于 2018-7-15 20:07 编辑
NGINX是反代的,绑定了a.com b.com c.com d.com 想不管输入哪个地址全部跳转到a.com 试了return 301 rewrite "^/(.*)$" 这些都不行,都提示重定向太多。
该怎么写呢?谢谢
- server {
- listen 80;
- server_name a.com b.com c.com d.com;
- index index.html index.htm index.php;
- access_log off;
- location / {
- proxy_set_header X-Real-IP $remote_addr;
- proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
- proxy_set_header Referer http://a.com;
- proxy_set_header Host $host;
- proxy_set_header Cookie $http_cookie;
- proxy_pass http://127.0.0.1;
复制代码 |
|