84669 person learning
152542 person learning
20005 person learning
5487 person learning
7821 person learning
359900 person learning
3350 person learning
180660 person learning
48569 person learning
18603 person learning
40936 person learning
1549 person learning
1183 person learning
32909 person learning
在一台vps上我跑了两个nginx的容器,同时指了两个域名到这个服务器,想这两个域名分别对应两个容器,怎样可以使这个两个域名不需要输入端口就可以直接访问
You need to run a real nginx (not nginx container) on this server as a reverse proxy. Configure two servers in this real nginx setting, then declare your two domain names respectively, and make the request Forwarded to nginx of both containers.
Please refer to this link for details
Search nginx configuration server_name
I don’t know if this can help you/a/11...
Search for nginx multi-domain name configuration. In fact, just write a few more server_name
One disadvantage of nginx without docker is that nginx cannot access static resources because the static resources are in docker.
You need to run a real nginx (not nginx container) on this server as a reverse proxy. Configure two servers in this real nginx setting, then declare your two domain names respectively, and make the request Forwarded to nginx of both containers.
Please refer to this link for details
Search nginx configuration server_name
I don’t know if this can help you
/a/11...
Search for nginx multi-domain name configuration. In fact, just write a few more server_name
One disadvantage of nginx without docker is that nginx cannot access static resources because the static resources are in docker.