Author Archives: fencatn

配置swift报错503

原先的swift不用了,更换为新主机,配置后,在控制节点验证时报错 Sep 27 02:57:04 controller proxy-server: Auth Token confirmed use of None apis Sep 27 02:57:04 controller proxy-server: ERROR with Account server 192.168.0.102:6002/sda4 re: Trying to HEAD /v1/AUTH_46890a3c5f1b45a39dc872d4601de7ef: Connection refused (txn: tx1f433d3167494f5a8b1e6-005d8db2c0) (client_ip: 192.168.0.101) Sep 27 02:57:04 controller proxy-server: ERROR … Continue reading

Posted in OpenStack | Tagged , | Leave a comment

nginx按IP控制访问

nginx拒绝或允许指定IP,是使用模块HTTP访问控制模块(HTTP Access). 控制规则按照声明的顺序进行检查,首条匹配IP的访问规则将被启用。 location / { deny 192.168.1.1; allow 192.168.1.0/24; allow 10.1.1.0/16; deny all; } 上面的例子中仅允许192.168.1.0/24和10.1.1.0/16网络段访问这个location字段,但192.168.1.1是个例外。 注意规则的匹配顺序,如果你使用过apache你可能会认为你可以随意控制规则的顺序并且他们能够正常的工作,但实际上不行。 下面的这个例子将拒绝掉所有的连接: location / { #这里将永远输出403错误。 deny all; #这些指令不会被启用,因为到达的连接在第一条已经被拒绝 deny 192.168.1.1; allow 192.168.1.0/24; allow 10.1.1.0/1 }

Posted in Nginx | Tagged | Leave a comment

解决wordpress 302循环重定向

我在用nginx转发内网wordpress的时候,css等样式加载不出来,点登陆,一堆302重定向报错:(ip已经隐去) X.X.X.X – – [26/Sep/2019:14:28:23 +0800] “GET /wp-login.php HTTP/1.1” 302 5 “https://blog.fencatn.net/” “Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.132 Safari/537.36 OPR/63.0.3368.94” “Y.Y.Y.Y” X.X.X.X – – [26/Sep/2019:14:28:23 +0800] “GET /wp-login.php HTTP/1.1” 302 5 “https://blog.fencatn.net/” “Mozilla/5.0 (Windows NT … Continue reading

Posted in Nginx, wordpress | Tagged , | Leave a comment

centos7系统内核优化

安装centos 7 系统之后要做的几件事 #修改主机名 hostnamectl –static set-hostname fencatn 写本地hosts vim /etc/hosts 127.0.0.1 fencatn x.x.x.x fencatn #下面是使用iptables systemctl stop firewalld.service systemctl disable firewalld.service yum -y install iptables-services 创建普通用户,给sudo权限 adduser fencatn passwd fencatn vim /etc/ssh/sshd_config Port 12345 PermitRootLogin no systemctl restart sshd.services … Continue reading

Posted in LinuxBasic | Tagged | Leave a comment

H3C三层交换机配置命令

H3C三层交换机配置命令 [H3C]dis cur ;显示当前配置 [H3C]display current-configuration ;显示当前配置 [H3C]display interfaces ;显示接口信息 [H3C]display vlan all ;显示路由信息 [H3C]display version ;显示版本信息 [H3C]super password ;修改特权用户密码 [H3C]sysname ;交换机命名 [H3C]interface ethernet 0/1 ;进入接口视图 [H3C]interface vlan x ;进入接口视图 [H3C-Vlan-interfacex]ip address 10.65.1.1 255.255.0.0 ;配置VLAN的IP地址 [H3C]ip route-static 0.0.0.0 0.0.0.0 10.65.1.2 … Continue reading

Posted in H3C | Tagged | Leave a comment

linux命令行使用curl获取外网IP方法

linux命令行使用curl获取外网IP方法: [root@n1 ~]# curl ipinfo.io { “ip”: “182.139.182.78”, “city”: “Zitong”, “region”: “Sichuan”, “country”: “CN”, “loc”: “30.7502,103.6966”, “org”: “AS4134 CHINANET-BACKBONE”, “timezone”: “Asia/Shanghai”, “readme”: “https://ipinfo.io/missingauth” } [root@n1 ~]# curl https://ip.cn {“ip”: “182.139.182.78”, “country”: “四川省成都市”, “city”: “电信”} [root@n1 ~]# curl cip.cc IP : … Continue reading

Posted in LinuxBasic | Tagged | Leave a comment

Nginx通过二级目录(路径)映射不同的反向代理

转载自https://blog.csdn.net/maliao1123/article/details/53909006 ①、同一个域名需要反向代理到前台和后台(不同机器和端口); ②、需要采用IP+端口的模式,嵌入到APP作为DNS污染后的备选方案。 server { listen 80; server_name demo.domain.com; #通过访问service二级目录来访问后台 location /service/ { #DemoBackend1后面的斜杠是一个关键,没有斜杠的话就会传递service到后端节点导致404 proxy_pass http://DemoBackend1/; proxy_redirect off; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; } #其他路径默认访问前台网站 location / { proxy_pass http://DemoBackend2; proxy_redirect off; proxy_set_header Host $host; proxy_set_header … Continue reading

Posted in Nginx | Tagged | Leave a comment

宝塔面板部署NextCloud逐一解决后台安全及设置警告

这个博主有很多关于nextcloud的资料,我只是转载一下: 宝塔面板部署NextCloud逐一解决后台安全及设置警告

Posted in Nextcloud | Tagged | Leave a comment

qcow2格式中lazy_refcounts的作用

原文地址:https://lists.gnu.org/archive/html/qemu-devel/2012-06/msg03825.html [Qemu-devel] [RFC 5/7] qcow2: implement lazy refcounts From: Stefan Hajnoczi Subject: [Qemu-devel] [RFC 5/7] qcow2: implement lazy refcounts Date: Fri, 22 Jun 2012 16:08:44 +0100 Lazy refcounts is a performance optimization for qcow2 that postpones refcount metadata updates and … Continue reading

Posted in kvm | Tagged | Leave a comment

ELK7.3部署与使用-4.filebeat+redis收集nginx访问日志

四、收集NGINX访问 1.1部署nginx服务 自己搞 1.2编辑nginx页面 自己搞 1.3将nginx日志转换为json格式 [root@n8 nginx]# cat /etc/nginx/nginx.conf user nginx; worker_processes 1; error_log /var/log/nginx/error.log warn; pid /var/run/nginx.pid; events { worker_connections 1024; } http { log_format main ‘$remote_addr – $remote_user [$time_local] “$request” ‘ ‘$status $body_bytes_sent “$http_referer” ‘ ‘”$http_user_agent” “$http_x_forwarded_for”‘; … Continue reading

Posted in ELK | Tagged | Leave a comment