1泞坦、php的配置可以在上線運行后關(guān)掉display_errors牡拇,因為為了方便查錯库倘,默認是開啟的display_errors = On
上線后可以關(guān)掉改成display_errors = Off
2巴元、win下運行php,給MySQL設(shè)置更大的InnoDB緩存陋率,這樣性能也會有所提高。
任何數(shù)據(jù)庫的緩存技術(shù)都可以提高數(shù)據(jù)庫性能秽晚,數(shù)據(jù)庫夠快瓦糟,網(wǎng)頁訪問才夠快,除非你全靜態(tài)赴蝇。
建議將innodb_log_buffer_size設(shè)置為系統(tǒng)物理內(nèi)存的 60%到80%之間菩浙。
3、打開對應(yīng)apache配置,比如php5.6版本就打開phpwamp\server\Apache2.4\conf\httpd-php5.6.14.conf
這里的# WinNT MPM是指劲蜻,如果是windos系統(tǒng)陆淀,那么就是使用這一段!
WinNT MPM
ThreadsPerChild: constant number of worker threads in the server process
MaxConnectionsPerChild: maximum number of connections a server process serves
<IfModule mpm_winnt_module>
ThreadsPerChild 500
MaxConnectionsPerChild 100000
</IfModule>
以上通常為PHPWAMP缺省的配置(缺省就是默認的意思)
可以改成如下設(shè)置
WinNT MPM
ThreadsPerChild: constant number of worker threads in the server process
MaxConnectionsPerChild: maximum number of connections a server process serves
<IfModule mpm_winnt_module>
#每個子進程可配置的線程數(shù)上限
ThreadLimit 500
#每個子進程的最大并發(fā)線程數(shù)先嬉。
ThreadsPerChild 500
#進程最大的請求數(shù)轧苫,設(shè)置太小了會影響服務(wù)器性能,設(shè)置太大會占用內(nèi)存疫蔓,根據(jù)網(wǎng)站情況設(shè)定含懊。
MaxConnectionsPerChild 100000
</IfModule>
4、windows下apache及mysql定時自動重啟衅胀,可以開啟phpwamp自帶的自動任務(wù)系統(tǒng)
5岔乔、可以在上線后可以關(guān)閉目錄的列出,搜索對應(yīng)的httpd-php配置滚躯,把 Options Indexes FollowSymLinks改成Options FollowSymLinks
關(guān)閉顯示目錄的時候雏门,如果該目錄沒有首頁文件,通常會顯示403掸掏。
允許顯示目錄
Options Indexes FollowSymLinks
禁止顯示目錄
Options FollowSymLinks