復制代碼 代碼如下:
tmp=/tmp/nginx
log=/home/jsckdao/log
pcre=~/downloads/pcre-8.02
zlib=~/downloads/zlib-1.2.5-src
openssl=~/downloads/openssl-0.9.8q
md5=~/downloads/md5-1.3.0
./configure --prefix=/usr/local/nginx
--http-proxy-temp-path=${tmp}/nginx-proxy.tmp
--http-fastcgi-temp-path=${tmp}/nginx-fcgi.tmp
--http-uwsgi-temp-path=${tmp}/nginx-uwsgi.tmp
--http-scgi-temp-path=${tmp}/nginx-scgi.tmp
--http-client-body-temp-path=${tmp}/nginx-client.tmp
--pid-path=${tmp}/nginx.pid
--lock-path=${tmp}/nginx.lock
--http-log-path=${log}/http.log
--error-log-path=${log}/http-error.log
--with-pcre=$pcre #pcre 源碼包的路徑
--with-zlib=$zlib #zlib 源碼包的路徑
--with-http_ssl_module #起用ssl支持
--with-openssl=$openssl #openssl 源碼包路徑
make
make install
復制代碼 代碼如下:
./configure --prefix=/usr/local/php
--with-mysql=/usr/local/mysql #設置mysql的安裝路徑
--enable-fastcgi #開啟fastcgi支持
--enable-debug #支持調試
make
make install
復制代碼 代碼如下:
location ~ .php$ {
root /home/jsckdao/www.3ppt.com; #這是你網站的根目錄
fastcgi_pass 127.0.0.1:3344; #這里指定了fastcgi進程偵聽的端口,nginx就是通過這里與php交互的
fastcgi_index index.php;
fastcgi_param script_filename $document_root/$fastcgi_script_name;
include fastcgi_params;
}
復制代碼 代碼如下:
<?php
phpinfo();
?>
新聞熱點
疑難解答
圖片精選