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