LAMP之路

不积跬步,无以至千里!

lnmp有关安全

2016-6-9 一抹阳光 环境架设

【php.ini】

disable_functions = passthru,exec,system,chroot,chgrp,chown,shell_exec,proc_open,proc_get_status,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,stream_socket_server,fsocket,fsockopen,gzinflate
date.timezone = "Asia/Shanghai"
error_reporting  =  E_ALL & ~E_NOTICE

【nginx.conf】

server {
        listen 80 default_server;
        server_name     _;
        return 500;
    }


[dedecms]

location ~ /(images|data|uploads|templets)/*.(php|php5)$ {
                deny all;
        }


【mysql】

use mysql;

SELECT DISTINCT CONCAT('User: ''',user,'''@''',host,''';') AS query FROM mysql.user;

Delete FROM user Where User='root' and Host<>'localhost';


【iptables】

firewall-web.zip

【robots】

robots.txt