随笔分类 -  NGINX

摘要:location中添加:deny all;(拒绝所有)、allow IP;(允许IP访问) 1、安装htpasswd yum install httpd htpasswd -c /usr/local/nginx/key admin; #生成账号密码 2、配置文件 location = /status 阅读全文
posted @ 2022-09-20 20:44 GUAtiger 阅读(156) 评论(0) 推荐(0)
摘要:添加upstream模块 upstream mywebs { ip_hash; #算法 server 192.168.10.61 weight=5 max_fails=3 fail_timeout=10s; server 192.168.10.62 weight=5 max_fails=3 fail 阅读全文
posted @ 2022-09-14 20:21 GUAtiger 阅读(15) 评论(0) 推荐(0)
摘要:在代理服务器中添加代理配置文件:/etc/nginx/conf.d/proxf.conf server { listen 80; server_name www.wp.com; location /{ proxy_pass http://www.wp.com; proxy_redirect defa 阅读全文
posted @ 2022-09-14 19:26 GUAtiger 阅读(23) 评论(0) 推荐(0)