歡迎您光臨本站 註冊首頁

apache和nginx都支持fastcgi

←手機掃碼閱讀     火星人 @ 2014-03-03 , reply:0

apache和nginx都支持fastcgi

apache和nginx都支持fastcgi


apache是模塊化結構,本身不自帶支持FASTCGI的模塊,要讓php-fastcg支持APACHE ,必須藉助於第三方模塊mod_fastcgi;

關於LAMP和LEMP的安裝:參照http://bbs.linuxtone.org/forum-22-1.html很詳細
下載
wget http://www.fastcgi.com/dist/mod_fastcgi-2.4.6.tar.gz

wget http://www.cpan.org/modules/by-module/FCGI/FCGI-0.67.tar.gz


安裝兩種方法:
1、
tar zxvf FCGI-0.67.tar.gz
perl Makefile.PL
make && make install
cd ..


tar zxvf mod_fastcgi-2.4.6.tar.gz
cd mod_fastcgi-2.4.6
cp Makefile.AP2 Makefile
make
make install
(如果MAKE報錯:
vi Makefile
修改top_dir後面apache安裝的真實的路徑;
例如:top_dir      = /usr/local/apache

修改:httpd.conf 添加
LoadModule fastcgi_module modules/mod_fastcgi.so
<Directory /usr/local/apache/htdocs>
       AllowOverride None
       Options +ExecCGI -Includes
       AddHandler fastcgi-script .fcg .fcgi
       Order allow,deny
       Allow from all
</Directory>

2、

手動dso安裝:
             # tar zxf mod_fastcgi-2.4.6.tar.gz
             # cd od_fastcgi-2.4.6
             # apxs -o mod_fastcgi.so -c *.c
             # apxs -i -a -n fastcgi .libs/mod_fastcgi.so
             在虛擬主機上(virturalhost)添加
                        Alias /fcgi/ /usr/local/apache/htdoc
                       <Directory /web/upload001/fcgi/>
                        AllowOverride None
                        Options +ExecCGI -Includes
                        AddHandler fastcgi-script .fcg .fcgi
                        Order allow,deny
                        Allow from all
                       </Directory>


安裝完畢,改下apache的埠立即就可以同時啟動apache和nginx,apache與nginx相互切換就OK了

[火星人 ] apache和nginx都支持fastcgi已經有357次圍觀

http://coctec.com/docs/service/show-post-1925.html