Lighttpd設定問題 [Solved]

我響Debian上裝左Lighttpd,跟住Official wiki同原本的*.conf檔重新設定Lighttpd,但係點都連唔到入Server。
  1. # Lighttpd configuration

  2. ##### Lighttpd core

  3. # Modules to load when startup
  4. server.modules = ("mod_accesslog")

  5. # The document-root of the web server
  6. server.document-root = "/var/web"

  7. # Port to listen
  8. server.port = 8000

  9. # The file to search for if directory is requested
  10. index-file.names = ("index.html", "index.htm", "index.php")

  11. # Mimetype mappings
  12. mimetype.assign = (".png" => "image/png",
  13.                    ".jpg" => "image/jpeg",
  14.                    ".jpeg" => "image/jpeg",
  15.                    ".tar.bz2" => "application/x-bzip-compressed-tar",
  16.                    ".html" => "text/html",
  17.                    ".htm" => "text/html")

  18. # Allow listing files when no index-file has been found or not
  19. server.dir-listing = "enable"

  20. # Page to show when 404 error occurs
  21. server.error-handler-404 = "404.html"

  22. # Path to error log
  23. server.errorlog = "/var/log/lighttpd/error.log"

  24. # User used to run the web server
  25. server.username = "www-data"

  26. # Group used to run the web server
  27. server.groupname = "www-data"

  28. # Path to the .pid file
  29. server.pid-file = "/var/run/lighttpd.pid"

  30. # Forbid access to source of some types of file by extension
  31. static-file.exclude-extensions = ".php"

  32. ##### For mod_accesslog
  33. accesslog.filename = "/var/log/lighttpd/access.log"
複製代碼
請問會係咩問題呢?電腦同Server係響同一個LAN入面,我響Browser直接打IP同Port都入唔到去。

謝。

[ 本帖最後由 GraphiteCube 於 2009-1-26 17:23 編輯 ]

有無on 到個service 先

TOP

回覆 2# 的帖子

當然有,/etc/init.d/lighttpd start試過,lighttpd -D -f lighttpd.conf又試過。

TOP

就咁睇用左port 8000 woo~
起browser 度有冇用port 8000?

TOP

回覆 4# 的帖子

TOP

哈,剛重新一行一行將Config. file打一次,發現係static-file.exclude-extensions問題。
  1. # Forbid access to source of some types of file by extension
  2. # Following syntax DOES NOT work
  3. static-file.exclude-extensions = ".php"
複製代碼
原來呢行的Values一定要用Array裝住,即:
  1. # Forbid access to source of some types of file by extension
  2. # Following syntax works!
  3. static-file.exclude-extensions = (".php")
複製代碼
但奇怪在我用lighttpd -t -f lighttpd.conf,佢會Report Syntax Ok,響Official doc.又見唔到話要用Array...

點都好,總算裝好Lighttpd,Config.埋PHP就可以轉用Lighttpd,無問題就Remove Apache...

Edit: 成功Config.埋PHP了...

[ 本帖最後由 GraphiteCube 於 2009-1-26 17:44 編輯 ]

TOP

想問問用左Lighthttpd..
個Server loading 細左幾多(比起APACHE)
之後問問..大娥你SERVER 個CONFIG .流量多小..
.因為想知道有無好明顯分別..THANKS

TOP

回覆 7# 的帖子

嗯... 其實我個網無人去,係我貪得意自己起黎寫下HTML/ PHP野。 所以Loading差得幾多真係答你唔到,不過Lighttpd個網有Benchmark可以睇睇既。

我部舊電腦用緊P4 1.8 GHz,768 MB RAM。

話說回來,有個同PHP有關既野唔係好明:
  1. fastcgi.server = ( ".php" => ((
  2.                      "bin-path" => "/path/to/php-cgi",
  3.                      "socket" => "/tmp/php.socket",
  4.                      "max-procs" => 2,
  5.                      "bin-environment" => (
  6.                        "PHP_FCGI_CHILDREN" => "16",
  7.                        "PHP_FCGI_MAX_REQUESTS" => "10000"
  8.                      ),
  9.                      "bin-copy-environment" => (
  10.                        "PATH", "SHELL", "USER"
  11.                      ),
  12.                      "broken-scriptfilename" => "enable"
  13.                  )))
複製代碼
我想問,Set左max-procs,仲有無需要Set PHP_FCGI_CHILDRENPHP_FCGI_MAX_REQUESTS呢兩個Variables呢?我見個PHP5-CGI好似食左好多RAM咁(Used 742 MB/ Cached 704 MB,其實Cache左果堆係咩黎?)。

TOP