顯示具有 back-end 標籤的文章。 顯示所有文章
顯示具有 back-end 標籤的文章。 顯示所有文章

2015-02-03

APACHE & PHP 基本安全設定

.htaccess
http://www.socss.cn/2011/php_0902/167.html

php.ini
http://jamesbond0479.blog.163.com/blog/static/241475820115231759458/

在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

[CI] 解決FastCGI 下無法獲得PATH_INFO的問題

http://codeigniter.org.cn/forums/thread-5884-1-4.html

http://codeigniter.com/forums/viewthread/68698/#389281

$_SERVER['PATH_INFO']:
http://php.net/manual/en/reserved.variables.server.php

Nginx 的 mod_rewirte 寫法

Nginx rewirte:
http://web302.com/tag/kohana3/
http://www.farinspace.com/codeigniter-nginx-rewrite-rules/
http://codeigniter.com/forums/viewthread/90231/

Nginx反盜連:
http://anejd.com/433.html#more-433
http://codeigniter.com/forums/viewthread/99180/
http://www.farinspace.com/codeigniter-nginx-rewrite-rules/
http://520.be/1440-nginx-%E4%BD%BF%E7%94%A8-htaccess-%E4%BF%9D%E8%AD%B7%E9%98%B2%E7%9B%9C%E9%80%A3%E9%99%90%E9%80%9F.html
http://blog.xuite.net/chingwei/blog/45256609-%E3%80%90%E7%B3%BB%E7%B5%B1%E3%80%91Nginx+%3A+%E7%94%A8+Referer+%E6%88%96+IP+%E4%BE%86%E6%93%8B%E7%9B%9C%E9%80%A3
http://jamesbond0479.blog.163.com/blog/static/241475820108610279889/?suggestedreading&wumii

[PHP] 加速方法 進程表

今天安裝了XCache來對php的opcode作緩存加速,再加上8 CPUs,果然有飛快的感覺。
但其實還有很多其它的加速方法,有空再來一個個加上去,先做一下note。

XCache: opcode caching (已安裝)
memcache: database calls, API calls, or page rendering caching
FastCGI: 將預設以ISAPI在run的PHP process改以FastCGI方式執行 (PHP-FPM)
Varnish: http proxy (比squid效能優秀,大量減少php運算及mysql查詢)
Nginx:http server (比apache效能優秀,增加效能10倍以上(據說...))

效能分析、測試工具、效能最佳化

http://fredwang.blogspot.com/2011/11/blog-post_04.html