background: The site is separated from the front and back ends: vue+springboot Front-end intranet address: 192.168.1.10:81 API intranet address: 192.168.1.12:8080 External domain name: abc.ab.com External IP: 10.114.XX need: The site and static resources can be accessed through the domain name, and the API request data can be accessed Solution 1: (Prerequisite: external domain name mapping server external IP) 1. nginx configures domain name monitoring and accesses static resources 2.Here comes the point! ! ! The address of the static resource request API is changed from 192.168.1.12:8080 to domain name access method (abc.ab.com:8080) Restart nginx Other solutions will be posted after the blogger has verified them! ! Supplementary knowledge: Use nginx to implement reverse proxy and realize external network access to internal network services Environmental background, the server is Ubuntu: A server A that can connect to the public network and the intranet, with a public IP address of 61.174.×.×. Another intranet server B has the Jenkins service installed, with an intranet IP address of 192.168.3.12 Steps: Install nginx on A
After installation, go to the /etc/nginx/sites-enabled directory, open the files in the directory, and change the default port number to 8085. Then go to the /etc/nginx/conf.d directory and create a new file jenkins.conf. The content of the file is as follows: server{ listen 8085; server_name 61.174.171.61; location /{ proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forward-For $proxy_add_x_forwarded_for; proxy_set_header Host $http_host; proxy_set_header X-Nginx-Proxy true; proxy_pass http://192.168.3.12:8080; proxy_redirect off; } Then execute
If an error occurs:
Then execute
Then visit 61.174.171.61:8085 on the public Internet to access the Jenkins service on the intranet. The above nginx external network access intranet site configuration operation is all the content that the editor shares with you. I hope it can give you a reference. I also hope that you will support 123WORDPRESS.COM. You may also be interested in:
|
<<: Detailed analysis of mysql MDL metadata lock
>>: Elementui exports data to xlsx and excel tables
The select element creates a single-select or mult...
This article example shares the specific code for...
VMware Tools is a tool that comes with VMware vir...
1. Summary of location usage Location can locate ...
Preface The reason why MySQL's innodb engine ...
more is one of our most commonly used tools. The ...
Table of contents Brief Introduction setInterval ...
This article uses an example to describe how to q...
When I was printing for a client recently, he aske...
zabbix_agent deployment: Recommendation: zabbix_a...
The so-called favicon, which is the abbreviation o...
Table of contents 1. Introduction 2. Rendering 3....
Docker installation Install dependency packages s...
This article example shares the specific code of ...
Only show the top border <table frame=above>...