How to replace Aliyun domain name to static ip and hide port by nginx

now port 80 in Aliyun is occupied, and the domain name defaults to port 80, but I use 8081 for tomcat. Can I use the nginx to reverse the domain name to the native ip:8081, and hide the 8081 that the domain name needs to bring

?
Apr.02,2021

Yes, you can first take a look at the concept of nginx virtual host. Nginx listens on port 80, but there can be multiple sites, so you can ask, nginx reverse proxy to 8081, the domain name does not need to take 8081 is just your hidden domain name?


you can add an individual name to your tomcat (set context in server.xml), for example, the original www.aa.com can be set to www.aa.com/alias.
then nginx agent www.aa.com/alias port 80 of this path, mapped to 8081

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-1b3e838-2b967.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-1b3e838-2b967.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?