1. Download FRP

Github.com/fatedier/fr…

Download the corresponding packages according to different systems. Here, my server is Linux and the local client is Windows, so I need to download two kinds of packages.

Linux: github.com/fatedier/fr…

windows:

Github.com/fatedier/fr…

MAC: github.com/fatedier/fr…

MAC remember to download Darwin_AMD *

Configure nginx

server { listen 80; server_name frp.forpastime.com; Proxy_pass http://127.0.0.1:8080/; proxy_pass http://127.0.0.1:8080/; proxy_set_header Host $host; proxy_set_header Remote_Addr $remote_addr; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $remote_addr; }}Copy the code

The local Vue project uses port 8080, so the nginx agent points to http://127.0.0.1:8080/ or http://localhost:8080/

3. Configure the FRP server

1. Decompress frp_0.36.2_linux_amd64.tar.gz

2. Modify the FRPS. Ini

[common] bind_port = 7000 vhost_http_port = 8080 Dashboard_addr = 0.0.0.0(A visual web page is displayed.) Dashboard_port = 7500 dashboard_user = admin dashboard_pwd = admin log_file = ./frps.log log_level = info log_max_days = 2 [web] type = http Custom_domains = frp.forpastime.com (same as server_name in nginx configuration) auth_token = ABCCopy the code

3. Start

./frps -c frps.ini
Copy the code

If no error message is displayed, the startup is successful

Configure the local client

1. Unzip the frp_0. 36.2 _windows_amd64. Zip

2. Modify FRPC. Ini

[common] server_addr = 192.168.2.249 (change your server IP address) server_port = 7000 (corresponding server bind_port, Indicates the port used by the client to communicate with the server.) auto_token = ABC (the same as that configured on the server) [web] type = HTTP local_port = 8080 (the port used by the local server) local_IP = 127.0.0.1 custom_domains = frp.forpastime.comCopy the code

3. Start the client service

frpc.exe -c frpc.ini
Copy the code

Five, validation,

Visit frp.forpastime.com to open the vUE project at localhost:8080

Vi. Server Background Operation:

 nohup ./frps -c frps.ini >/dev/null 2>&1 &
Copy the code

7. If the client is Linux, run in the background

nohup ./frpc -c frpc.ini >/dev/null 2>&1 &
Copy the code

Nginx with FRP Intranet penetration configuration, wechat authorized domain name debugging local project wechat apap customization baidu ApAP customization Website customization wechat application development (forpastime.com)