Current location - Quotes Website - Team slogan - How to use different domain names of nginx to point to different ports of the same IP?
How to use different domain names of nginx to point to different ports of the same IP?
Set the port on which you are listening and set server_name to ip+ port.

Server {

Listen to 9000;

Character set utf-8;

server _ name xx . xx . xx . xx:9000;

......

}

Restart, and then you can access it with this IP.