In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article is about how to ensure that the frps server and web share 80 ports in nginx. The editor thinks it is very practical, so I share it with you. I hope you can get something after reading this article. Let's take a look at it.
Step 1: modify the nginx.conf configuration file in the server
Add the following parameters to http {} in nginx.conf
Server {listen 80; server_name xiaoyue.ml www.xiaoyue.ml; location / {proxy_pass http://127.0.0.1:8080; proxy_redirect http://$host/ http://$http_host/; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Host $host;}}
As shown in the following figure, save and restart nginx after setting it.
Step 2: modify the frp server configuration file
Now that the reverse proxy is on port 8080, the configuration file on the frp server also needs to be set.
Vhost_http_port = port 8080 in frps.ini configuration file
Step 3: modify the frp client profile
Step 1: enter the corresponding domain name here in server_name xiaoyue.ml www.xiaoyue.ml;.
Universal resolution is also supported, such as server_name * .xiaoyue.ml. Domain name is required to perform universal resolution at the same time.
So how to modify frpc.ini? it's very simple.
The corresponding domain name is configured in the corresponding traversal service configuration, custom_domains = xiaoyue.ml
Step 4:
Restart frps in the server, start frpc in the local computer, and you can access xiaoyue.ml directly through port 80 in the browser.
Add 1:
Xiaoyue.ml is parsed to my server, and this site is built on my own computer in the local area network.
That is, first of all, make sure that you visit 127.0.0.1 on your computer, which is full of content.
Add 2:
The reverse proxy in the first step can do the same.
Pagoda backstage
1) website-- > add site, enter your domain name
For example, enter the added domain name xiaoyue.ml to submit
2) Click Settings-> reverse proxy
Enter http://127.0.0.1:8080 in the target URL. Do not enter an error.
Select to enable reverse proxy
The above is how to ensure that the frps server and web share port 80 in nginx. The editor believes that there are some knowledge points that we may see or use in our daily work. I hope you can learn more from this article. For more details, please follow the industry information channel.
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.