Current location - Quotes Website - Team slogan - Nginx configures port 80 for multiple domain names.
Nginx configures port 80 for multiple domain names.
Port 80 can be accessed directly through the domain name (no need to add a port). Under normal circumstances, port 80 can only be used for one domain name, but multiple ports can be realized through nginx configuration. Taking Alibaba Cloud ECS server as an example, after installing nginx by command, open the nginx configuration file.

Configure multiple domain name jumps as follows

2. Upload the source code according to the configured path.

3. Configure the security group on the ecs server in Alibaba Cloud and open the configured port. Path ECS Service-More-Network and Security Groups-Security Group Configuration-Configuration Rules-Add Ports to Open.

4. Corresponding analysis of domain name addition

5. restart nginx. It's done.