OS:CentOS6.5(阿里云官方)
WebServer:Nginx
步驟:1.下載解壓網址下載http://php.net/downloads.php
./configure --prefix=/usr/local/php --with-mysql --with-mysql-sock --with-mysqli --enable-fpm --with-ncurses --enable-soap --with-libxml-dir --with-XMLrpc --with-openssl --with-mcrypt --with-mhash --with-pcre-regex --with-sqlite3 --with-zlib --enable-bcmath --with-iconv --with-bz2 --enable-calendar --with-curl --with-cdb --enable-dom --enable-exif --enable-fileinfo --enable-filter --with-pcre-dir --enable-ftp --with-gd --with-openssl-dir --with-jpeg-dir --with-png-dir --with-zlib-dir --with-freetype-dir --enable-gd-native-ttf --enable-gd-jis-conv --with-gettext --with-gmp --with-mhash --enable-json --enable-mbstring --disable-mbregex --disable-mbregex-backtrack --with-libmbfl --with-onig --enable-pdo --with-pdo-mysql --with-zlib-dir --with-pdo-sqlite --with-readline --enable-session --enable-shmop --enable-simplexml --enable-sockets --enable-sqlite-utf8 --enable-sysvmsg --enable-sysvsem --enable-sysvshm --enable-wddx --with-libxml-dir --with-xsl --enable-zip --enable-mysqlnd-compression-support --with-pear
其中阿里云的鏡像CentOS 沒有 ncurses XMLrpc sqlite3 這3個依賴 我直接把這3個依賴刪除了
3.建立軟連接4.遇到的問題1>.服務器上html文件可以訪問,php文件無法訪問。log:2014/11/102014/11/10 12:55:24 [alert] 6438#0: 1024 worker_connections are not enough1.http://www.th7.cn/Program/php/201408/254237.shtml 修改 php-fpm.conf request_terminate_timeout=0; 沒用
2.nginx.conf 修改worker_connections 1024--5000 沒用
3.http://www.netingcn.com/nginx-proxy-error-500.html解決辦法就是修改配置文件中的worker_connections值,將其調大。但是今天在本機的nginx中配置一個proxy,完全沒有外界的訪問的情況也提示上述錯誤,試著修改worker_connections也沒有解決問題。文中是代理回環。我沒有用apache。所以將apache-php部分注釋掉。保留php-fpm部分。問題解決。
參考 http://www.jb51.net/article/47916.htm
在Nginx配置文件中找到定義調用腳本文件的地方:fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
改為:astcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
PHP編程鄭重聲明:本文版權歸原作者所有,轉載文章僅為傳播更多信息之目的,如作者信息標記有誤,請第一時間聯系我們修改或刪除,多謝。
新聞熱點
疑難解答