自拍偷在线精品自拍偷,亚洲欧美中文日韩v在线观看不卡

Ubuntu lighttpd安裝和配置

系統(tǒng) Linux
Ubuntu lighttpd修改配置文件查找"#### CGI module"在這行之后添加cgi.assign = ( ".sh" => "" )然后我們再寫一個(gè)shell腳本來作測試 test.sh.

Ubuntu lighttpd已被廣泛應(yīng)用但是也在不斷的更新,這里介紹Ubuntu lighttpd安裝設(shè)置使用,幫助大家安裝更新Ubuntu lighttpd系統(tǒng)。

一、關(guān)于測試環(huán)境

Ubuntu 5.10 , gcc4.0.2 , php5.1.1 , Ubuntu lighttpd 1.4.10如果要測試FASTCGI在編譯PHP時(shí)需要打開fastcgi的選項(xiàng)( --enable-fastcgi)

二、下載相關(guān)軟件

Ubuntu lighttpd http://www. lighttpd.net/download/php http://www.php.net

三、安裝和配置

1、安裝Ubuntu lighttpd

  1. root@tonyvicky:# tar vxzf Ubuntu lighttpd-1.4.10.tar.gz  
  2. root@tonyvicky:# cd Ubuntu lighttpd-1.4.10  
  3. root@tonyvicky:# ./configure --prefix=/usr/local/Ubuntu lighttpd  
  4. root@tonyvicky:# make  
  5. root@tonyvicky:# make install  
  6. root@tonyvicky:# mkdir /usr/local/Ubuntu lighttpd/htdocs  
  7. root@tonyvicky:# mkdir /usr/local/Ubuntu lighttpd/etc  
  8. root@tonyvicky:# cp ./doc/Ubuntu lighttpd.conf /usr/local/Ubuntu lighttpd/etc/ 

2、配置Ubuntu lighttpd

然后修改配置文件 /usr/local/ lighttpd/etc/ lighttpd.conf把"mod_fastcgi"前邊的#去掉(在24行);把"mod_cgi"前邊的#去掉(在29行)設(shè)置網(wǎng)站根目錄 server.document-root = "/usr/local/ lighttpd/htdocs/" (40行)設(shè)置錯(cuò)誤日志文件路徑 server.errorlog = "/usr/local/ lighttpd/ lighttpd.error.log" (43行)設(shè)置訪問日志文件路徑accesslog.filename = "/usr/local/ lighttpd/access.log" (116行)啟動(dòng)服務(wù)器

  1. root@tonyvicky:# cd /usr/local/Ubuntu lighttpd/sbin/  
  2. root@tonyvicky:# ./Ubuntu lighttpd -f ../etc/Ubuntu lighttpd.conf 

如果出現(xiàn)錯(cuò)誤請把配置文件中如下內(nèi)容刪除

  1. $HTTP["url"] =~ "\.pdf$" {  
  2. server.range-requests = "disable" 

3、配置CGI

修改配置文件查找"#### CGI module"在這行之后添加cgi.assign = ( ".sh" => "" )然后我們再寫一個(gè)shell腳本來作測試 test.sh

  1. #!/bin/bash  
  2. echo "Content-Type: text/html";  
  3. echo "";  
  4. echo "test"; 

把這個(gè)文件保存到/usr/local/ lighttpd/htdocs/下并改變權(quán)限r(nóng)oot@tonyvicky:# chmod a+x test.sh然后用瀏覽器訪問一下 http://localhost/test.sh如果能出現(xiàn)"test"的字樣,就說明CGI模塊正常使用了.

4、配置fastcgi

修改配置文件查找"#### fastcgi module"在這行之后添加

  1. fastcgi.server = ( ".php" => 
  2. (( "socket" => "/tmp/php.socket",  
  3. "bin-path" => "/usr/local/php/bin/php",  
  4. "min-procs" => 1,  
  5. "max-procs" => 32,  
  6. "max-load-per-proc" => 4,  
  7. "idle-timeout" => 20  
  8. ))  

寫一個(gè)PHP文件,看看能不能解析出來

  1. <? 
  2. // test.php  
  3. phpinfo();  
  4. ?> 

用瀏覽器訪問一下 http://localhost/test.php

【編輯推薦】

  1. Ubuntu lighttpd安裝解壓縮運(yùn)行代碼
  2. Ubuntu PHP測試環(huán)境中調(diào)試和分析代碼
  3. Ubuntu Ruby在Rails應(yīng)用程序中解決內(nèi)存泄漏問題
  4. Ubuntu ruby解析器應(yīng)用程序的優(yōu)化
  5. Ubuntu ror性能優(yōu)化經(jīng)驗(yàn)與應(yīng)用的部署
責(zé)任編輯:佚名 來源: CSDN
相關(guān)推薦

2022-09-01 08:37:50

Ubuntu發(fā)行版

2010-03-05 09:50:37

Ubuntu ligh

2010-01-14 14:32:07

CentOS ligh

2011-03-29 10:22:33

2010-02-22 14:53:49

Ubuntu ngin

2010-01-15 20:59:54

2011-05-24 09:33:40

UbuntuOpenStackNova

2015-09-30 14:04:36

KVMUbuntuLinux

2019-10-21 13:28:38

UbuntuPostgreSQL命令

2020-03-18 14:40:14

Ubuntu 18.0RedisLinux

2011-03-23 09:07:48

2011-03-11 16:42:38

Ubuntu安裝LAMP

2015-09-22 11:01:01

Plank DockUbuntuLinux

2022-09-14 11:31:37

MySQL數(shù)據(jù)庫管理系統(tǒng)

2010-01-07 12:46:28

Ubuntu nfs

2010-01-08 17:03:58

Ubuntu網(wǎng)絡(luò)設(shè)置

2010-01-04 17:25:34

Ubuntu安裝

2010-01-06 10:04:55

2009-07-09 15:58:40

Ubuntu JDK安

2010-01-07 16:34:08

Ubuntu apac
點(diǎn)贊
收藏

51CTO技術(shù)棧公眾號