-
-
Save xvybihal/8e3ce150bed3e13f64a1d2644224f20f to your computer and use it in GitHub Desktop.
PHP FPM Hardening php.ini
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| upload_tmp_dir = "/var/php_tmp" | |
| session.save_path = "/var/lib/php/sessions" | |
| open_basedir = "/var/www:/var/lib/php/sessions:/var/php_tmp" | |
| file_uploads = Off | |
| allow_url_fopen = Off | |
| disable_functions = "php_uname, getmyuid, getmypid, passthru, leak, listen, diskfreespace, tmpfile, link, ignore_user_abord, shell_exec, dl, set_time_limit, exec, system, highlight_file, source, show_source, fpaththru, virtual, posix_ctermid, posix_getcwd, posix_getegid, posix_geteuid, posix_getgid, posix_getgrgid, posix_getgrnam, posix_getgroups, posix_getlogin, posix_getpgid, posix_getpgrp, posix_getpid, posix, _getppid, posix_getpwnam, posix_getpwuid, posix_getrlimit, posix_getsid, posix_getuid, posix_isatty, posix_kill, posix_mkfifo, posix_setegid, posix_seteuid, posix_setgid, posix_setpgid, posix_setsid, posix_setuid, posix_times, posix_ttyname, posix_uname, proc_open, proc_close, proc_get_status, proc_nice, proc_terminate, phpinfo" | |
| expose_php = Off | |
| error_reporting = E_ALL | |
| display_error = Off | |
| display_startup_errors = Off |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| php_admin_value[upload_tmp_dir] = "/var/php_tmp" | |
| php_admin_value[session.save_path] = "/var/lib/php/sessions" | |
| php_admin_value[open_basedir] = "/var/www:/var/lib/php/sessions:/var/php_tmp" | |
| php_admin_flag[file_uploads] = Off | |
| php_admin_flag[allow_url_fopen] = Off | |
| php_admin_value[disable_functions] = "php_uname, getmyuid, getmypid, passthru, leak, listen, diskfreespace, tmpfile, link, ignore_user_abord, shell_exec, dl, set_time_limit, exec, system, highlight_file, source, show_source, fpaththru, virtual, posix_ctermid, posix_getcwd, posix_getegid, posix_geteuid, posix_getgid, posix_getgrgid, posix_getgrnam, posix_getgroups, posix_getlogin, posix_getpgid, posix_getpgrp, posix_getpid, posix, _getppid, posix_getpwnam, posix_getpwuid, posix_getrlimit, posix_getsid, posix_getuid, posix_isatty, posix_kill, posix_mkfifo, posix_setegid, posix_seteuid, posix_setgid, posix_setpgid, posix_setsid, posix_setuid, posix_times, posix_ttyname, posix_uname, proc_open, proc_close, proc_get_status, proc_nice, proc_terminate, phpinfo" | |
| php_admin_flag[expose_php] = Off | |
| php_admin_value[error_reporting] = E_ALL | |
| php_admin_flag[display_error] = Off | |
| php_admin_flag[display_startup_errors] = Off |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment