服务器抓取网页 如何伪装自己,web服务器伪装

13 //修正版本

file: os/os2/os.h

#define PLATFORM //OS的名称,例如:Solaris"

如果不是伪装,而只是不显示是apache,可以在apache配置文件中添加以下两行

ServerTokens ProductOnly

ServerSignature Off

既然谈到了服务器,也就再谈一点php的安全措施,可以关闭显示服务器端为php,具体做法是在/etc/php.ini添加:

expose_php = Off

在php的生产环境下建议做一些额外的安全措施:

enable_dl = Off

disable_functions =

exec,system,passthru,shell_exec,escapeshellarg,escapeshellcmd,proc_close,proc_open,dl,popen,show_source

如果你建立的是虚拟主机那么你需要一份更长的函数列表:

disable_functions = escapeshellarg, escapeshellcmd, exec, passthru,

proc_close, proc_get_status, proc_open, proc_nice, proc_terminate,

shell_exec, system, ini_restore, popen, dl, disk_free_space,

diskfreespace, set_time_limit, tmpfile, fopen, readfile, fpassthru,

fsockopen, mail, ini_alter, highlight_file, openlog, show_source,

symlink, apache_child_terminate, apache_get_modules,

apache_get_version, apache_getenv, apache_note, apache_setenv,

parse_ini_file

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值