My nginx is bound to several domain names, but I want these domain names to be used as aliases, and all incoming requests will be forwarded to my main domain name
Currently, I can only configure multiple servers. How should I configure nginx to transfer to a domain name?
高洛峰2017-05-16 17:31:51
oneserver
绑定多个域名 : server_name www.fb.com ta.fb.com c.fb.com
jump
if ($host !~* ^www\.fb\.com$)
{
rewrite ^/(.*)$ http://www.fb.com/ redirect;
}
I haven’t configured it for more than a year, so I don’t know if it’s correct, haha, that’s probably the idea
巴扎黑2017-05-16 17:31:51
Specially, register an account. Tell everyone. There is a semicolon missing on the first floor; hahahahaha after the redirect