nginx php-cgi php

來源:互聯網
上載者:User

標籤:

/*************************************************************************** *                         nginx php-cgi php * 說明: *     由於有需要多個web訪問的需求,於是選擇使用nginx來做連接埠映射,剛開始配置 * 的時候沒法先php還有fpm模式,因為交叉編譯php的時候只選擇cgi,所以配置的過程 * 中遇到問題,還有就是沒注意到要將php-cgi跑起來才行,之前通過busybox httpd是 * 不需要這麼做的。 * *                                         2016-9-26 深圳 南山平山村 曾劍鋒 **************************************************************************/一、參考文檔:    1. NGINX - No input file specified. - php Fast/CGI        http://stackoverflow.com/questions/21377321/nginx-no-input-file-specified-php-fast-cgi    2. 解決NGINX PHP "No input file specified"        http://xiahongyuan.blog.51cto.com/906214/852424    3. Nginx+php-cgi的配置方法介紹        http://blog.csdn.net/bookmoth/article/details/4568203    4. windows下配置nginx+php環境        http://www.cnblogs.com/huayangmeng/archive/2011/06/15/2081337.html二、修改nginx php配置:    server {        listen       80;        server_name  localhost;        root /var/www/;        index index.html index.htm index.php;        # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000        location ~ \.php$ {            fastcgi_pass   127.0.0.1:9000;            fastcgi_index  index.php;            fastcgi_param  SCRIPT_FILENAME  /scripts$fastcgi_script_name;            include        fastcgi.conf;            include        fastcgi_params;        }    } 三、啟動php-cgi:    1. php-cgi -b 127.0.0.1:9000 -c /etc/php.ini    2. 開機自啟動:        cat /etc/init.d/S51phpCGI            echo "Start php-cgi."            php-cgi -b 127.0.0.1:9000 -c /etc/php.ini &

 

nginx php-cgi php

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.