1、前言
首先,得批評下自己漱挎。在Mac系統(tǒng)下典蝌,搗鼓了一個禮拜左右的服務(wù)器配置代理,然后某個時刻恍然大悟(應(yīng)該是幡然醒悟):除了我這樣艇拍,貌似沒有誰那么傻會用Mac當(dāng)服務(wù)器吧狐蜕。。卸夕。那寫Mac下Nginx沒什么用了层释。不過Unix和linux相似點很多,如果只是想要粗淺學(xué)習(xí)nginx的配置之類的快集,也可以在MacOS系統(tǒng)進行贡羔。但是如果想要了解更多服務(wù)器,想要的不僅僅是寫寫demo之類的粗淺工作的話个初,或者說以后想要在阿里云啊騰訊云啊之類的買服務(wù)器(它總不會給你配個Mac系統(tǒng)吧)乖寒,雖說命令相似,但是還是建議還是在Linux系統(tǒng)進行吧勃黍,早點熟悉熟悉也好~
云服務(wù)器: 騰訊云(找考研小伙伴認證了學(xué)生賬號)
系統(tǒng):
系統(tǒng): CentOS 7.2 64位
服務(wù)器: Nginx 1.11.12 ([官網(wǎng)](http://nginx.org/en/download.html))
二宵统、Nginx
1、手動下載安裝nginx覆获,非yum安裝
######0. 這里是我的個性化設(shè)置
mkdir /usr/local/downloads ##新建個文件夾马澈,以后用來放下載的東西
ln -s /usr/local/donwloads / ##在root目錄下加個快捷方式
cd /downloads ##進入到這個文件夾
######1. 下載nginx安裝包
wget http://nginx.org/download/nginx-1.11.11.tar.gz
######2. 解壓安裝包
tar -zxv -f nginx-1.11.11.tar.gz
######3. 重命名文件夾
mv nginx-1.11.11.tar.gz nginx
######4. 配置configure的初始目錄
cd nginx ##先進入到nginx安裝包中
./configure --prefix=/usr/local/nginx ##prefix前置目錄不能是安裝包所在的目錄,否則會出錯
## 執(zhí)行命令后弄息,系統(tǒng)開始檢查安裝所需的依賴文件痊班,會出現(xiàn)不少ERROR,具體見本節(jié)Tips
######5. 編譯安裝nginx
make ##編譯
make install ##安裝
######6. 檢查是否安裝成功
cd /usr/local ##在local里面看到了nginx文件夾
cd nginx ##進入到nginx文件夾看到有conf html logs sbin 文件夾
#訪問 http://localhost/ 可以看到Welcome to nginx!說明安裝成功
######0. 個性化設(shè)置
###安裝完成摹量,還是習(xí)慣性的加了些我的個人設(shè)置
ln -s /usr/local/nginx/sbin/nginx /usr/local/bin ##在bin里面添加nginx命令涤伐,這樣就不需要每次啟動都要通過/usr/local/nginx/sbin/nginx來啟動
Tips
################ Tip 1################## ####### 當(dāng)系統(tǒng)檢查依賴文件時,會出現(xiàn)一大堆的found和少數(shù)not found ####### 這是因為大部分的依賴包缨称,Linux系統(tǒng)中都有凝果,如g++,gcc等 ####### 也有小部分依賴包是需要我們自己去安裝的,如PCRE睦尽、openssl器净,zlib等(當(dāng)然也可以安裝,這些主要是擴展modelue所需的) ####### 所以根據(jù)系統(tǒng)錯誤提示当凡,我們?nèi)ハ滤璧囊蕾嚢?#Error 1: "./configure: error: the HTTP rewrite module requires the PCRE library." #缺少PCRE依賴包山害,這個包主要用來HTTP rewrite yum search pcre ##找到要下載的pcre-devel yum install pcre-devel #Error 2: "./configure: error: the HTTP gzip module requires the zlib library." #缺少zlib包纠俭,主要用來HTTP 打包壓縮解壓等功能 yum search zlib ##找到要下載的zlib-devel yum install zlib-devel #Error 3: # 可能還有個openssl的錯誤,不過我沒遇到 yum search openssl ##找到要下載的openssl yum install openssl-devel ################ Tip 2################## ##### 有個小技巧浪慌,在安裝之前可以提前安裝完所有的依賴包 ###### yum -y groupinstall "Development tools,Server platform development,Desktop platform development" yum -y install pcre-devel openssl-devel
2冤荆、nginx所有文件目錄位置
###1、安裝包文件所在:/usr/local/downloads/nginx
###新增模塊权纤,編譯都要通過./configure進行
###2钓简、主要文件夾:
/usr/local/nginx
|
|+conf #配置文件夾
- nginx.conf # nginx的主要配置文件,主要配置
## 動態(tài)服務(wù)器配置文件
- fastcgi.conf # FastCGI配置文件,主要負責(zé)nginx與php數(shù)據(jù)傳遞(作用見Tip1)
- fastcgi_params # FastCGI的主要配置文件(和fastcgi.conf區(qū)別見Tip2)
- uwsgi_params # 類似FastCGI,用來部署python服務(wù)器的配置文件
- scgi_params # scgi 的配置文件,類似FastCGI妖碉。
## 文件類型映射表
- mime.types # mime.types是文件類型的設(shè)置配置文件涌庭。
## 編碼轉(zhuǎn)換映射文件,主要是輸出內(nèi)容轉(zhuǎn)碼
- win-utf # windows-1251 <--> utf-8
- koi-utf # koi8-r <--> utf-8
- koi-win # koi8-r <--> windows-1251
|+html #網(wǎng)頁根目錄文件夾
-50x.html #50x錯誤頁面
-index.html #主頁
|-logs #日志文件夾
- error.log #錯誤日志
- access.log #登錄日志
- nginx.pid #nginx的pid
|-sbin #命令文件夾
- nginx #啟動命令
|+client_body_temp # \
|+proxy_temp # --\ 各類臨時
|+scgi_temp # --/ 文件
|+uwsgi_temp # /
3欧宜、nginx的基礎(chǔ)命令
### 0坐榆、查看nginx主進程號
ps -aux | grep nginx
### 1、啟動nginx前冗茸,先測試配置文件是否正確
nginx -t #### 默認測試 /usr/local/nginx/nginx.conf 配置文件席镀;
nginx -t -c **/nginx.conf #### 測試你想要的nginx配置文件;
### 2夏漱、啟動nginx
nginx
./usr/local/bin/nginx
### 3豪诲、停止nginx (一般通過-s 發(fā)送信號的方式)
nginx -s stop/quit #### (*推薦*)
###### 知道了主進程號后,可以通過殺進程方式停止nginx
kill -QUIT pid #### 從容停止
kill -TERM pid #### 快速停止
kill -9 pid #### 前置停止
### 4挂绰、重啟nginx, 修改.conf 配置文件后需要重啟
nginx -s reload
kill -HUP pid/path #### 通過nginx的進程號平滑重啟
### 5屎篱、制定配置文件 -c
nginx -c /usr/local/nginx/nginx.conf
### 6、查看nginx版本
nginx -v ####版本號
nginx -V ####詳細版本信息
4葵蒂、nginx的基礎(chǔ)配置(與Mac配置基本一致)
5交播、nginx新增模塊
- 1、查看nginx的版本信息和模塊信息
nginx -V
顯示信息:
nginx version: nginx/1.11.12
built by gcc 4.8.5 (Red Hat 4.8.5-11)(GCC)
configure arguments: --prefix=/usr/local/nginx
2践付、查看nginx的可用模塊
進入到安裝文件夾(/usr/local/downloads/nginx)
./configure --help
顯示一堆with-http.....之類的秦士,這些都是可以安裝的模塊3、輸入要安裝模塊
./configure --prefix=/usr/local/nginx --with... #想要加什么模塊永高,在后面加什么
如:
./configure --prefix=/usr/local/nginx --with-http_ssl_module --with-http_stub_status_module
4隧土、新增模塊
make
make install
5、檢查新增是否成功
nginx -V #如果后面的configure arguments有了你要的參數(shù)命爬,則添加成功
6曹傀、開機自啟動
- 首先需要編寫開機啟動的shell腳本
vim /etc/init.d/nginx
腳本如下:
#!/bin/sh
#
# nginx - this script starts and stops the nginx daemin
#
# chkconfig: - 85 15
# description: Nginx is an HTTP(S) server, HTTP(S) reverse \
# proxy and IMAP/POP3 proxy server
# processname: nginx
# config: /usr/local/nginx/conf/nginx.conf
# pidfile: /usr/local/nginx/logs/nginx.pid
# Source function library.
. /etc/rc.d/init.d/functions
# Source networking configuration.
. /etc/sysconfig/network
# Check that networking is up.
[ "NETWORKING" = "no" ] && exit 0
nginx="/usr/sbin/nginx"
prog=(basename nginx)
NGINX_CONF_FILE="/usr/local/nginx/conf/nginx.conf"
lockfile=/var/lock/subsys/nginx
start() {
[ -x nginx ] || exit 5
[ -f NGINX_CONF_FILE ] || exit 6
echo -n "Starting prog: "
daemon nginx -c NGINX_CONF_FILE
retval=?
echo
[ retval -eq 0 ] && touch lockfile
return retval
}
stop() {
echo -n "Stopping prog: "
killproc prog -QUIT
retval=?
echo
[ retval -eq 0 ] && rm -f lockfile
return retval
}
restart() {
configtest || return ?
stop
start
}
reload() {
configtest || return ?
echo -n "Reloading prog: "
killproc nginx -HUP
RETVAL=?
echo
}
force_reload() {
restart
}
configtest() {
nginx -t -c NGINX_CONF_FILE
}
rh_status() {
status prog
}
rh_status_q() {
rh_status >/dev/null 2>&1
}
case "1" in
start)
rh_status_q && exit 0
1
;;
stop)
rh_status_q || exit 0
1
;;
restart|configtest)
1
;;
reload)
rh_status_q || exit 7
1
;;
force-reload)
force_reload
;;
status)
rh_status
;;
condrestart|try-restart)
rh_status_q || exit 0
;;
*)
echo "Usage: 0 {start|stop|status|restart|condrestart|try-restart|reload|force-
reload|configtest}"
exit 2
esac
修改文件權(quán)限
chmod a+x /etc/init.d/nginx
修改開機自啟動
chkconfig --add nginx #添加到服務(wù)列表
chkconfig nginx on #設(shè)置開機自啟動
三、MySQL
1.下載安裝MySQL
下載地址:MySQL官網(wǎng)下載界面Community Server
注意別下載錯了饲宛。皆愉。。是Community Server里的源碼
下載安裝包:
wget https://dev.mysql.com/get/Downloads/MySQL-5.7/mysql-boost-5.7.17.tar.gz
解壓安裝包并重命名
tar -zxvf mysql-boost-5.7.17.tar.gz
查看是否已經(jīng)有my.cnf 配置文件
locate my.cnf
mv my.cnf my.cnf.backup
創(chuàng)建文件安裝目錄
mkdir /usr/local/mysql
mkdir /usr/local/mysql/data
建立組和用戶
groupadd mysql
useradd -r -g mysql -s /bin/false mysql
編譯
cd /root/downloads/mysql-5.7.17
cmake -DCMAKE_INSTALL_PREFIX=/usr/local/mysql -DMYSQL_DATADIR=/usr/local/mysql/data -DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8_general_ci -DEXTRA_CHARSETS=all -DENABLED_LOCAL_INFILE=1 -DWITH_BOOST=boost
#如果編譯出錯,發(fā)生cmake error亥啦,那就看看錯誤信息,缺少哪個依賴就yum install哪個
安裝
make & make install
坑1:
#如果make的時候练链,到40%多可能會報下面的錯:
c++: 編譯器內(nèi)部錯誤:已殺死(程序 cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://bugzilla.redhat.com/bugzilla> for instructions.
make[2]: *** [sql/CMakeFiles/sql.dir/item_geofunc.cc.o] 錯誤 4
make[1]: *** [sql/CMakeFiles/sql.dir/all] 錯誤 2
make: *** [all] 錯誤 2
#[原因是:http://blog.csdn.net/cryhelyxx/article/details/47610247]
#原因是內(nèi)存空間不夠翔脱,具體解決措施是:
dd if=/dev/zero of=/swapfile bs=1k count=2048000 #獲取要增加的2G的SWAP文件塊
mkswap /swapfile #創(chuàng)建SWAP文件
swapon /swapfile #激活SWAP文件
swapon -s #查看SWAP信息是否正確
echo "/var/swapfile swap swap defaults 0 0" >> /etc/fstab #添加到fstab文件中讓系統(tǒng)引導(dǎo)時自動啟動
#注意, swapfile文件的路徑在/var/下
#編譯完后, 如果不想要交換分區(qū)了, 可以刪除:
swapoff /swapfile
rm -fr /swapfile
2
設(shè)置目錄權(quán)限
cd /usr/local/mysql
chown -R root:mysql . #把當(dāng)前目錄中所有文件的所有者所有者設(shè)為root,所屬組為mysql
chown -R mysql:mysql data
復(fù)制配置文件
cp support-files//my-default.cnf /etc/my.cnf
初始化mysql媒鼓,開啟ssl
bin/mysqld --initialize-insecure --user=mysql --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data
bin/mysql_ssl_rsa_setup --user=mysql --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data
設(shè)置開機自啟動
cp /usr/local/mysql/support-files/mysql.server /etc/init.d/mysql
chmod +x /etc/init.d/mysql
chkconfig --add mysql
chkconfig mysql on
修改配置文件
vim /etc/my.cnf
>>>
[mysqld]
datadir=/usr/local/mysql/data
default-storage-engine=MyISAM
log-error = /usr/local/mysql/mysql_error.log
pid-file = /usr/local/mysql/mysql.pid
user = mysql
tmpdir = /tmp
<<<
四届吁、PHP
1.下載PHP5.6
下載方法有各種,我是通過官網(wǎng)下載到Mac然后上傳到服務(wù)器的绿鸣,因為這樣速度快點
2.編譯安裝PHP
# 編譯配置:來源于網(wǎng)上[http://blog.csdn.net/zhang_xinxiu/article/details/51817653]
./configure \
--prefix=/usr/local/php56 \
--with-config-file-path=/usr/local/php56/etc \
--enable-inline-optimization \
--disable-debug \
--disable-rpath \
--enable-shared \
--enable-opcache \
--enable-fpm \
--with-fpm-user=nginx \
--with-fpm-group=nginx \
--with-mysql=mysqlnd \
--with-mysqli=mysqlnd \
--with-pdo-mysql=mysqlnd \
--with-gettext \
--enable-mbstring \
--with-iconv \
--with-mcrypt \
--with-mhash \
--with-openssl \
--enable-bcmath \
--enable-soap \
--with-libxml-dir \
--enable-pcntl \
--enable-shmop \
--enable-sysvmsg \
--enable-sysvsem \
--enable-sysvshm \
--enable-sockets \
--with-curl \
--with-zlib \
--enable-zip \
--with-bz2 \
--with-readline
# 安裝目錄
--prefix
# 配置文件php.ini位置
--with-config-file-path
# 優(yōu)化選項
--enable-inline-optimization
--disable-debug
--disable-rpath
--enable-shared
# 啟用opcache
--enable-opcache
# 配置php-fpm
--enable-fpm
--with-fpm-user
--with-fpm-group
# 配置MySQL
--with-mysql
--with-mysqli
--with-pdo-mysql
# 國際化與字符編碼支持
--with-gettext
--enable-mbstring
--with-iconv
# 加密
--with-mcrypt
--with-mhash
--with-openssl
# 數(shù)學(xué)擴展
--enable-bcmath
# Web 服務(wù)疚沐,soap 依賴 libxml
--enable-soap
--with-libxml-dir
# 進程,信號及內(nèi)存
--enable-pcntl
--enable-shmop
--enable-sysvmsg
--enable-sysvsem
--enable-sysvshm
# socket & curl
--enable-sockets
--with-curl
# 壓縮與歸檔
--with-zlib
--enable-zip
--with-bz2
# GNU Readline 命令行快捷鍵綁定
--with-readline
# 一般需要提示你缺了啥依賴包潮模,需要安裝
# 反正報啥錯就增加啥
添加依賴包
yum install libxml2-devel bzip2-devel libcurl-devel libmcrypt-devel readline-devel
編譯安裝
make && make install
3.新增配置文件
配置文件夾路徑: /usr/local/php56/etc
復(fù)制配置文件
1.php配置文件php.ini
cp php.ini-development /usr/local/php56/etc/php.ini
# 這里有一點需要提示大家亮蛔,安裝包內(nèi)的php.ini配置文件有兩個:
## 1.php.ini-production 安全性較高,一般用于生產(chǎn)
## 2.php.ini-development 一般用于開發(fā)
# 因為第二個比第一個顯示的錯誤信息更多會暴露用戶一些信息擎厢,
# 所以一般產(chǎn)品要正式使用的話建議用production究流,要用哪個就復(fù)制哪個為php.ini
2.php-fpm配置文件php-fpm.conf
cd /usr/local/php56/etc
cp php-fpm.conf.default php-fpm.conf
3.復(fù)制啟動腳本
cd /downloads/php-5.6.30/sapi/fpm
cp init.d.php-fpm /etc/init.d/php-fpm
chmod +x /etc/init.d/php-fpm
4.把php可執(zhí)行的命令添加到profile中
echo "PATH=PATH:/usr/local/php56/bin:/usr/local/php56/sbin" >> /etc/profile
source /etc/profile
# 這樣就可以直接執(zhí)行 'php-fpm' 了.
5.設(shè)置php-fpm開機自啟動
chkconfig --add php-fpm
chkconfig php-fpm on
到此為止一共做了三件事:
1.創(chuàng)建php的配置文件
2.創(chuàng)建php-fpm的配置文件
3.創(chuàng)建php-fpm的啟動腳本
4.引入php等可執(zhí)行命令
5.php自啟動
4.修改配置文件
- 修改php-fpm配置文件php-fpm.conf
;include=etc/fpm.d/*.conf
;;;;;;;;;;;;;;;;;;
; Global Options ;
;;;;;;;;;;;;;;;;;;
[global]
;prefix 應(yīng)用根目錄在/usr/local/php56
;Pid文件 :默認var/run/php-rpm.pid
pid = run/php-fpm.pid
; 錯誤日志 :默認在var/log/php-fpm.log
error_log = log/php-fpm.log
; 寫入錯誤日志的級別:alert, error, warning, notice(默認), debug
log_level = error
; 表示在emergency_restart_interval所設(shè)值內(nèi)出現(xiàn)SIGSEGV或者SIGBUS錯誤的php-cgi進程數(shù)
; 如果超過 emergency_restart_threshold個,php-fpm就會優(yōu)雅重啟动遭。這兩個默認值都是0
emergency_restart_threshold = 60
;單位可以是s(econd)(默認),m(minutes),h(hours),d(ays)
emergency_restart_interval = 60
; 限制子進程接受主進程復(fù)用信號的超時時間(默認是0s)
; 單位: s(econds)(默認單位), m(inutes), h(ours), or d(ays)
process_control_timeout = 0
; 最大進程數(shù)
; process.max = 128
; 主進程的優(yōu)先級芬探,由高到低是-19~20
; process.priority = -19
; 后臺執(zhí)行fpm,默認值為yes,
; 如果為了調(diào)試可以改為no厘惦。
; 在FPM中偷仿,可以使用不同的設(shè)置來運行多個進程池。
; 這些設(shè)置可以針對每個進程池單獨設(shè)置宵蕉。
daemonize = yes
;;;;;;;;;;;;;;;;;;;;
; Pool Definitions ;
;;;;;;;;;;;;;;;;;;;;
[www]
; Per pool prefix
; It only applies on the following directives:
; - 'access.log'
; - 'slowlog'
; - 'listen' (unixsocket)
; - 'chroot'
; - 'chdir'
; - 'php_values'
; - 'php_admin_values'
;prefix = /path/to/pools/$pool
; 啟動進程的賬戶和組
user = nginx
group = nginx
; fpm監(jiān)聽端口酝静,即nginx中php處理的地址,一般默認值即可国裳。
; 常用格式有 'ip:port'形入、'port'、'/path/to/unix/socket'
listen = 127.0.0.1:9000
; backlog數(shù)缝左,-1表示無限制亿遂,由操作系統(tǒng)決定,此行注釋掉就行渺杉。
;listen.backlog = 65535
; unix socket設(shè)置選項蛇数,如果使用tcp方式訪問,這里注釋即可是越。
listen.owner = nginx
listen.group = nginx
listen.mode = 0660
;listen.acl_users =
;listen.acl_groups =
;listen.allowed_clients = 127.0.0.1
; process.priority = -19
; 如何控制子進程 對于專用服務(wù)器耳舅,pm可以設(shè)置為static
; Possible Values:
; static - a fixed number (pm.max_children) of child processes;
; dynamic - the number of child processes are set dynamically based on the
; following directives. With this process management, there will be
; always at least 1 children.
; pm.max_children - 子進程最大數(shù)
; pm.start_servers - 啟動時的進程數(shù)
; pm.min_spare_servers - 保證空閑進程數(shù)最小值,如果空閑進程小于此值,則創(chuàng)建新的子進程
; pm.max_spare_servers - 保證空閑進程數(shù)最大值浦徊,如果空閑進程大于此值馏予,此進行清理
; ondemand - no children are created at startup. Children will be forked when
; new requests will connect. The following parameter are used:
; pm.max_children - the maximum number of children that
; can be alive at the same time.
; pm.process_idle_timeout - The number of seconds after which
; an idle process will be killed.
; Note: This value is mandatory.
pm = dynamic
pm.max_children = 5
pm.start_servers = 2
pm.min_spare_servers = 1
pm.max_spare_servers = 3
;pm.process_idle_timeout = 10s;
; 設(shè)置每個子進程重生之前服務(wù)的請求數(shù).
; 對于可能存在內(nèi)存泄漏的第三方模塊來說是非常有用的.
; 如果設(shè)置為 '0' 則一直接受請求, 等同于 PHP_FCGI_MAX_REQUESTS 環(huán)境變量.
; 默認值: 0
pm.max_requests = 500
; FPM狀態(tài)頁面的網(wǎng)址. 如果沒有設(shè)置, 則無法訪問狀態(tài)頁面. 默認值: none. munin監(jiān)控會使用到
pm.status_path = /status
; ;FPM監(jiān)控頁面的ping網(wǎng)址.
; 如果沒有設(shè)置, 則無法訪問ping頁面.
; 該頁面用于外部檢測FPM是否存活并且可以響應(yīng)請求.
; 請注意必須以斜線開頭 (/)。
ping.path = /ping
; 用于定義ping請求的返回響應(yīng).
; 返回為 HTTP 200 的 text/plain 格式文本.
; 默認值: pong.
;ping.response = pong
; 登錄 log
access.log = log/$pool.access.log
; accessLog格式
; Default: "%R - %u %t \"%m %r\" %s"
access.format = "%R - %u %t \"%m %r%Q%q\" %s %f %{mili}d %{kilo}M %C%%"
;慢請求的記錄日志
;配合request_slowlog_timeout使用
slowlog = log/$pool.log.slow
;當(dāng)一個請求該設(shè)置的超時時間后
;就會將對應(yīng)的PHP調(diào)用堆棧信息完整寫入到慢日志中.
;設(shè)置為 '0' 表示 'Off'
request_slowlog_timeout = 0
; 設(shè)置單個請求的超時中止時間.
; 該選項可能會對php.ini設(shè)置中的'max_execution_time'因為某些特殊原因沒有中止運行的腳本有用.
; 設(shè)置為 '0' 表示 'Off'.
; 當(dāng)經(jīng)常出現(xiàn)502錯誤時可以嘗試更改此選項盔性。
request_terminate_timeout = 0
; 設(shè)置文件打開描述符的rlimit限制.
; 默認值: 系統(tǒng)定義值默認可打開句柄是1024霞丧,
; 可使用 ulimit -n查看,ulimit -n 2048修改冕香。
rlimit_files = 1024
; 設(shè)置核心rlimit最大限制值. 可用值: 'unlimited' 蛹尝、0或者正整數(shù). 默認值: 系統(tǒng)定義值.
;rlimit_core = 0
; 啟動時的Chroot目錄. 所定義的目錄需要是絕對路徑. 如果沒有設(shè)置, 則chroot不被使用.
;chroot =
; 設(shè)置啟動目錄,啟動時會自動Chdir到該目錄.
; 所定義的目錄需要是絕對路徑.
; 默認值: 當(dāng)前目錄悉尾,或者/目錄(chroot時)
;chdir = /var/www
; 重定向運行過程中的stdout和stderr到主要的錯誤日志文件中.
; 如果沒有設(shè)置, stdout 和 stderr 將會根據(jù)FastCGI的規(guī)則被重定向到 /dev/null .
; 默認值: 空.
;catch_workers_output = yes
;clear_env = no
;security.limit_extensions = .php .php3 .php4 .php5
- 修改php配置文件php.ini
中文翻譯在[github:https://github.com/HeDefine/PHP.ini-for-Chinese/tree/master](https://github.com/HeDefine/PHP.ini-for-Chinese/tree/master]