我正在运行安装了Ubuntu的VPS.如何在不指定URL中的端口(xxx.xxx.xxx.xxx:8084)的情况下使用相同的VPS(相同的IP)来为多个Golang网站提供服务?
例如,Golang app 1正在侦听端口8084,而Golang app 2正在侦听端口8060.当有人从域请求时,我希望Golang app 1能够在域example1.com和Golang应用2请求时提供服务example2.com.
example1.com
example2.com
我相信你可以用Nginx做到这一点但我无法弄清楚如何做到这一点.
port http nginx go
go ×1
http ×1
nginx ×1
port ×1