03
May
给apache编译加载模块
以安装mod_rewrite为例
进入源码中包含模块的文件夹
cd src/httpd-2.0.64/modules/mappers
执行
# /usr/local/apache/bin/apxs -iac mod_rewrite.c
完事儿!
以安装mod_rewrite为例
进入源码中包含模块的文件夹
cd src/httpd-2.0.64/modules/mappers
执行
# /usr/local/apache/bin/apxs -iac mod_rewrite.c
完事儿!
By admin|Web服务器|Be the first to comment!
我的解决办法是在.htaccess中添加以下代码作重定向
(阅读全文……)
By admin|Web服务器|Be the first to comment!
有段日子没碰apache有点生疏了。以后每次遇到问题都到这篇日志里记录下。
为什么不识别php文件而日志也没有报错?
检查是否在apache的httpd.conf中添加
LoadModule php5_module modules/libphp5.so
DirectoryIndex index.php index.html
AddType application/x-httpd-php .php
By admin|Web服务器|Be the first to comment!
nginx中防止别人域名指向你的IP,设置后没有在server中绑定的域名会返回400
server {
listen 80 default;
location / { return 400; }
}
By admin|Web服务器|Be the first to comment!
如果使用Nginx作为反向代理,而使用这样的配置,那么整站被拿下是迟早的事。
导致问题:Index of/ 也就是俗称的列目录,整站的所有源代码将全部展示在攻击者面前。