Centos nginx and tomcat use reverse proxy to generate a URL with nexus

Source: Internet
Author: User
Background:

I have been studying Maven nexus private servers recently, so I want to build a private server on my laptop. I can see that many private servers have their own domain names on the Internet, so I want to generate a domain name by modifying the host during the building process.

Successful:

 

Operation steps: 1) download nginx2 from the nginx official website) install nginx

Installation Steps refer to http://www.cnblogs.com/zhoulf/archive/2013/02/09/2909653.html

[[email protected] nginx]# ./configure --prefix=/usr/local/nginx

Problem: I wanted to modify the configuration path and encountered an error where nginx compilation failed. Later, I used/usr/local/nginx by default to solve the problem.

3) after the installation is successful, visit 127.0.0.1 to the nginx welcome page 4) modify the nginx configuration file
vi /usr/local/nginx/conf/nginx.conf

  

5) Add the server configuration as shown in Figure

Note: In the settings of the second-level domain name, the last/Signature of proxy_pass is not added at the beginning, resulting in access failure at the old time:

Reference: http://wangwei007.blog.51cto.com/68019/1103734

6) test whether the modified configuration file is correct:

[[Email protected] nginx] #/usr/local/nginx/sbin/nginx-T
Nginx: the configuration file/usr/local/nginx/CONF/nginx. conf syntax is OK
Nginx: configuration file/usr/local/nginx/CONF/nginx. conf test is successful

7) Make nginx configuration take effect again

[[Email protected] nginx] # ps aux | grep nginx
Root 4217 0.0 0.0 3740 1276? SS sep13 0: 00 nginx: Master process./sbin/nginx
Nobody 4595 0.0 0.0 3876? S nginx: Worker Process
Root 4734 0.0 0.0 4356 736 pts/1 S + grep nginx
[[Email protected] nginx] #
[[Email protected] nginx] # kill-HUP 4217
[[Email protected] nginx] #/usr/local/nginx/sbin/nginx-s reload

 

In addition, nginx is a very lightweight HTTP server compiled by Russians. nginx is pronounced as "engine X". It is a high-performance HTTP and reverse proxy server and also an IMAP/POP3 server./SMTPThe proxy server. nginx was developed by the Russian site Igor Sysoev, which has the second access traffic in Russia. It has been running on this site for more than two and a half years. Igor Sysoev uses the BSD-based license when creating a project.

Its powerful functions are also reflected in actual operations and applications such as server Load balancer, caching, and URL rewite. Due to limited resources, we will not study these functions for the moment. refer to the following article:

Http://freeloda.blog.51cto.com/2033581/1288553

Centos nginx and tomcat use reverse proxy to generate a URL with nexus

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.