详解nginx配置url重定向-反向代理

2019-10-17 19:08:58丽君

2.3、配置client1

mkdir /var/www/html/other
echo "192.168.10.129" > /var/www/html/other/index.html

2.4、测试;

访问url:    http://www.lansgg.com/other     你会发现跳转到了 : http://192.168.10.129/other/

wKiom1Rd6hKzwCh2AAB13d4xNOk488.jpg

查看日志:

[root@client1 ~]# tail -f /var/log/httpd/access_log 
192.168.10.1 - - [06/Nov/2014:21:25:44 +0800] "GET /other/ HTTP/1.1" 200 15 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:32.0) Gecko/20100101 Firefox/32.0"

以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持易采站长站。