民审-M

微信微赞微信系统安全部署配置的一般性教程/策略

作者:民审-M   发布时间:2017-09-12 08:27   回复数:0   浏览数:298
民审-M
2980民审-M金牌草根
2017-09-12 08:27:43
2980 2017-09-12 08:27:43
用于云服务器客户

PHP.INI下禁用敏感函数:
搜索(这个谨慎设置,模块加密会用到部分函数,设置了可能会造成打开空白)disable_functions =

改成:

disable_functions =eval,passthru,popen,exec,system,chroot,scandir,chgrp,chown,shell_exec,proc_open,proc_close,escapeshellarg,escapeshellcmd,show_source,proc_get_status,ini_alter,ini_alter,ini_restore,dl,pfsockopen,openlog,syslog,readlink,symlink,popepassthru,stream_socket_server,fsocket,fsockopen


apache下的站点配置示例:

<VirtualHost *:80>
       php_admin_value open_basedir "/xxx/www/:/tmp/:/proc/"
       #这句的作用是限制php文件只能操作当前目录下的文件,简单来说就是防止后门程序访问系统文件和其他站点文件殃及无辜
       DocumentRoot /xxx/www
       ServerName weixinmofang.com
       ServerAlias weixinmofang.com
       ErrorLog "/xxx/log/012wz.com-error.log"
       CustomLog "/xxx/log/012wz.com.log" common

       <Directory ~ "^/xxx/www/(data|addons|attachment|framework)">
               <FilesMatch "\.(php|php5)$">
                       Order allow,deny
                       Deny from all
               </FilesMatch>
       </Directory>
       #这句的意思禁止设置的目录下执行php文件,多个目录可用|分开,注意这里是绝对路径
</VirtualHost>

【温馨提示:】上面的/xxx/ww是你微赞站点的绝对路径,切勿生搬硬套。
游客
登录后才可以回帖,登录 或者 注册