Experimental environment: one centos 7 (ngindx 192.168.80.150) one windows server 2019 (web service 192.168.80.222)
win 7 (client)
The first step is to create a .conf configuration file in the /etc/nginx/conf.d/ directory with a customized name.
In the second step, write the following command.
upstream web1 {
server 192.168.80.222;
}
server {
listen 80;
server_name www.pip.cc;
location / {
proxy_pass http://web1;
}
}
The third step is to build a website in Windows Server 2019 and configure the homepage.
(Note that there is no need to build a dynamic dns, we only need to build a static dns)
The fourth step is to modify the hosts file under the c drive
C:\Windows\System32\drivers\etc
Just write the following command.
Step 5, ping test
The sixth step is to access via win 7 browser.