How multiple services in the server share port 80

for the Apache service used by the company in the background, there is now a new nginx proxy static page at the front end, but the listening port 80 always accesses Apache. How to configure nginx so that it can also listen to port 80

Mar.21,2021

to distinguish by domain name, step:

  1. nginx configuration enables server_name
  2. do not directly ip, bind the local host, to a fake domain name when accessing nginx, such as 127.0.0.1 domain.test
-sharp 
server {
     listen       80;
     server_name  domain1.test  www.domain1.test;
     ...
}
...

-sharp 
server {
     listen       80;
     server_name  domain2.test  www.domain2.test;
     ...
}
...
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3bddb-2c2e1.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3bddb-2c2e1.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?