虚拟机IP192.168.1.182,nginx.conf的server配置如下
server {
listen 80;
server_name nginx.com;
location / {
root /var/www;
proxy_pass https://www.baidu.com;
}
}
此时访问nginx.com会跳转到百度的页面,值得注意的是:浏览器显示的是nginx.com这个域名但是页面是百度的页面
虚拟机IP192.168.1.182,nginx.conf的server配置如下
server {
listen 80;
server_name nginx.com;
location / {
root /var/www;
proxy_pass https://www.baidu.com;
}
}
此时访问nginx.com会跳转到百度的页面,值得注意的是:浏览器显示的是nginx.com这个域名但是页面是百度的页面
转载于:https://www.cnblogs.com/leon2659/p/10185568.html