我遇到的,多数是虚拟主机的域名错误引起的
今天遇到一特例,
直接访问www.example.com
报403 Forbidden
但www.example.com/index.php是正常的
是因为server_name www.example.com后少了个分号
正确的应该是
server_name www.example.com ;
奇怪nginx -t并不报错
文章属于类别 Linux
Nginx的403 Forbidden
Nginx的No input file specified错误
访问www.example.com/install.php
提示“No input file specified”
网上找到很多原因
但我遇到的不是那样
是因为include/hosts/vhost.conf行少了一个分号
正确的应该是
include/hosts/vhost.conf;
SecureCRT中文版scp时无法用key
SecureCRT中文版scp时无法用key
需要输入密码
英文版没有遇到过
选项–>全局选项–>SSH2,选上启用OpenSSH代理程序
用iptables的string模块禁止浏览器对80的访问
有个软件监听的是80端口,但不提供Web服务
麻烦的是又可以通过ip:80访问到,还有输出
这样就不和谐了
80是不能封的,封了客户端就连接不了
想到用iptables禁止浏览器对80的访问
问了些QQ群的朋友,可以实现
先看下有没有string这个模块
iptables -m string –help
如果有,它会提示一堆帮助信息,没有则显示
iptables v1.2.11: Couldn’t load match `string’:/lib64/iptables/libipt_string.so: cannot open shared object file: No such file or directory
已知iptables v1.3.5是有的
规则,HTTP就是我们要过滤的关键字,–algo,指定使用的算法,有2中,分别是kmp,bm
/sbin/iptables -I INPUT -p tcp -m string –string HTTP –algo kmp –dport 80 -j DROP
保存规则
/sbin/iptables-save
ejabberd安装错误
./configure
报以下错
checking for XML_ParserCreate in -lexpat… no
configure: error: Could not find development files of Expat library
解决:
安装expat-devel
yum -y install expat-devel