nginx forward proxy config
来源:互联网 发布:计算机科学与软件学院 编辑:程序博客网 时间:2024/05/02 12:08
一、nginx正向代理配置:
本次配置的代理服务器在linux环境下;
使用默认配置文件/usr/local/conf/nginx.conf:
cat /etc/resolv.conf可以看到
search localhost
nameserver 8.8.8.8
此为dns服务器
因此,在nginx配置文件中配置如下localtion项:
#location / {
# root html;
# index index.html index.htm;
#}
把默认的注释掉,然后
location / {
resolver 8.8.8.8;
proxy_pass $scheme://$http_host$request_uri;
allow 172.20.30.187;
deny all;
}
配置完后到/usr/local/sbin下./nginx -s reload加载配置;
nginx支持的操作可以通过nginx -h或-?看;
二、客户端
windows下客户端设置代理服务指向刚刚配置的机器地址即可;
nginx不支持connect,所以,不支持代理https连接,网银等安全连接通过ngxi代理就不能用了;
如果还有其他代理服务器支持安全连接的话,可以在客户端网络配置里单独配置https连接的代理服务器地址;
nginx还是做反向吧,正向的话网上说可以尝试squid、apache,这里先折腾nginx。
- nginx forward proxy config
- Forward proxy 以及 reverse proxy
- git config http proxy
- nginx-config
- Flex配置文件-proxy-config.xml
- what's the different between forward proxy and reverse proxy?
- docker nginx jwilder/nginx-proxy
- nginx proxy https
- Nginx Proxy Cache分析
- Nginx Proxy Cache分析
- Nginx and reverse proxy
- Nginx Proxy Cache分析
- nginx proxy的使用
- nginx reverse proxy
- configure websocket forward in nginx
- nginx config example
- kohana nginx config
- Nginx 配置文件config
- uva 1203 - Argus(优先队列)
- Jquery+bootstrap实现静态博客主题
- 准确率和召回率(precision&recall)
- 伪命题“政府市场干预者是可行的”
- LAMP环境搭建 Linux/SSH/FTP server
- nginx forward proxy config
- uva 11997 - K Smallest Sums(优先队列)
- java动态代理(JDK和cglib)
- HDU 2492 pingpang
- ubuntu 下的 hadoop 安装
- 密码保险箱 TBox
- flex中嵌入网页
- 杂谈4
- UVa 620 Cellular Structure(DP)