• nginx-status

    发布于:2019-07-15 作者:Garany 评论(0) 引用(0) 浏览(145)   分类:破万卷书  

    1.开启NGINX状态页stub_status # vim /etc/nginx/conf.d/default.conf server { listen *.80 default_server; server_name localhost _; location / { return 403; } location /nginx-status { stub_status on; access_log off; allow 127.0.0.1; deny all; } } 2.检测配置文件,重启NGINX # nginx -t nginx: the configuration file /etc/nginx/nginx.conf syntax is ok nginx: configuration file /etc/nginx/nginx.conf test is successful # /etc/init.d/nginx rel...

    阅读全文>>

  • linux配置路由器功能

    发布于:2019-03-05 作者:Garany 评论(3) 引用(0) 浏览(218)   分类:破万卷书  

    server1 em1 114.114.114.114 em2 192.168.10.100 server2 em1 192.168.10.10 没有公网地址的server2利用server1的公网地址em1访问外网 server1 1.启用 IP 转发 # vim /etc/sysctl.conf net.ipv4.ip_forward = 1 # sysctl -p 2.配置 IPtables/Firewalld 规则(em1为配置有外网 IP 的网卡名称) 2.1 Centos/RHEL 7 # systemctl start firewalld # firewall-cmd -permanent -direct -passthrough ipv4 -t nat -I POSTROUTING -o em1 -j MASQUERADE -s 192.168.10.0/24  2.2 CentOS/RHEL 6 # service iptables start # iptables -F # iptables -t n...

    阅读全文>>