In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
Detailed description of the implementation of Nginx+Tomcat to achieve single IP, multi-domain name, multi-site access
Foreword:
Recently, I helped my friend to build two websites with a very small budget. As small as two websites can only run on a public network server with 512m memory (tomcat+MySQL, because the memory is too small, only two websites can be deployed on the same tomcat), each website has its own domain name, preliminary consideration is to use nginx as a reverse proxy to map the two domain names to the corresponding application. So there is the configuration problem on the title "nginx multi-domain list server single IP single Tomcat different applications". I won't say much about the nonsense introduced by Nginx. Post the configuration file here for your reference:
The configuration file for the domain name A:www.a.com is as follows:
Server {listen 80; server_name * .a.com; location / {proxy_pass http://localhost:8080/projectA/; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;}}
The configuration file for the domain name B:www.b.com is as follows:
Server {listen 80; server_name * .b.com; location / {proxy_pass http://localhost:8080/projectB/; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;}}
The above is an example of Nginx+Tomcat to achieve single IP, multi-domain name, multi-site access, if you have any questions, please leave a message or go to the community to exchange and discuss, thank you for reading, hope to help you, thank you for your support!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.