我想在nginx配置服务器名中使用通配符。
(例子)
server_name m.*.domain.com;
但这表明
nginx: [emerg] invalid server name or wildcard "m.*.domain.com" on 0.0.0.0:80
nginx: configuration file /etc/nginx/nginx.conf test failed
有可能解决这个问题吗?
我需要知道如何在nginx中对某些url模式进行代理传递。
我写了一封信,但我不确定它是否如我所愿。我想要的是
1. if the url matches '/member-chat' it needs to be redirected the proxy pass
2. anything else needs to be re-written as below
写的是对的吗?
location ^/member-chat {
proxy_pass http://lxx.com:5280/http-bind;
}
location !/member-chat {