Home | Mirror | Search

2. Web Server

web 伺服器其下腳本程序的權限:400

images 等需要用戶上傳檔案的目錄權限:500

2.1. 目錄訪問控制

			

<Location ~ "/((static/)|(css/)|(images/)).*\.php">
	Order Deny,Allow
	Deny from all
</Location>

			
			

2.2. fastcgi 安全

nginx 用戶 www:www

php-fpm 用戶 nobody:nogroup

2.3. php 函數安全

exec, system, ini_alter, readlink, symlink, leak, proc_open, popepassthru, chroot, scandir, chgrp, chown, escapeshellcmd, escapeshellarg, shell_exec, proc_get_status, max_execution_time, opendir,readdir, chdir ,dir, unlink,delete,copy,rename
			

2.4. 伺服器版本信息

Apache:
ServerTokens ProductOnly
ServerSignature Off

Nginx:
server_tokens off;

PHP:
expose_php Off

Tomcat:
server="Your App Server"
			

細節參考《Netkiller Linux 手札》

comments powered by Disqus