In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-30 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces "how to configure nginx.conf on CentOS Nginx server". In daily operation, I believe many people have doubts about how to configure nginx.conf on CentOS Nginx server. The editor consulted all kinds of materials and sorted out simple and easy-to-use operation methods. I hope it will be helpful to answer the doubts about "how to configure nginx.conf on CentOS Nginx server". Next, please follow the editor to study!
Before giving you a detailed introduction to CentOS Nginx, first let you know about CentOS Nginx, and then a comprehensive introduction to CentOS Nginx, I hope it will be useful to you. CentOS Nginx has been recognized as a highly efficient proxy service and can be used for load balancing at the same time.
Since the project currently has only one CentOS Nginx server, which cannot be used for testing, I intend to find the version under Nginx windows; users with win32 above http://www.kevinworthington.com/nginx/win32/ access sp.imichat.com balanced to 10.10.10.181 sp.imichat.com 8080; 10.10.10.181 sp.imichat.com 8081; 10.10.10.181 Nginx windows 8082; these three servers
Configure nginx.conf for CentOS Nginx
Http {} adds the following content: upstream sp.imichat.com {server 10.10.181 upstream sp.imichat.com 8080; server 10.10.10.181 upstream sp.imichat.com 8081; server 10.10.10.181 upstream sp.imichat.com 8082;} server {} modify the alien information: listen 80; server_name sp.imichat.com; # charset koi8-r; # access_log logs/host_access_log main; location / {proxy_pass proxy_pass proxy_set_header Host $host Proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;} access_log logs/sp.imichat.com.log combined; [/ code]
Start the 3 tomcat on 181and modify the tomcat home page join port information to clearly see which tomcat is currently assigned to launch the Nginx, and visit the http://sp.imichat.com/ to see that the request has been sent to the 3 servers.
Grab the http package and you can see that request is
GET / HTTP/1.1 Host: sp.imichat.com User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; zh-CN; rv:1.9.0.4) Gecko/2008102920 Firefox/3.0.4 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Accept-Language: en-us,zh-cn;q=0.5 Accept-Encoding: gzip,deflate Accept-Charset: gb2312,utf-8;q=0.7,* Qroom0.7 Keep-Alive: 300 Connection: keep-alive Cookie: JSESSIONID=A75E09D2EBF769A7BD95195E29DE87DE; key=1227008000183; memberName=admin; memberType=%7C%u8D85%u7EA7%u7BA1%u7406%u5458%7C Pragma: no-cache Cache-Control: no-cache
Response:
HTTP/1.1 200 OK Server: nginx/0.7.21-win32 Date: Tue, 18 Nov 2008 12:12:33 GMT Content-Type: text/html Connection: keep-alive ETag: W / "8157-1227009260637" Last-Modified: Tue, 18 Nov 2008 11:54:20 GMT Content-Length: 8157, this is the end of the study on "how to configure nginx.conf on a CentOS Nginx server". I hope you can solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!
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.