Loading ...
Sorry, an error occurred while loading the content.
 

Re: Lighttpd and PHP-fastcgi

Expand Messages
  • Joey
    Actually I have lighttpd working on my slug (with php) currently without an issue, since I can t remember what I did to get everything working here are
    Message 1 of 2 , May 3, 2006
      Actually I have lighttpd working on my slug (with php) currently
      without an issue, since I can't remember what I did to get everything
      working here are portions of my /opt/etc/lighttpd/lighttpd.conf

      # lighttpd configuration file
      #
      # use it as a base for lighttpd 1.0.0 and above
      #
      # $Id: lighttpd.conf,v 1.1 2006/03/06 23:31:44 bzhou Exp $

      ############ Options you really have to take care of ####################

      ## modules to load
      # at least mod_access and mod_accesslog should be loaded
      # all other module should only be loaded if really neccesary
      # - saves some time
      # - saves memory
      server.modules = (
      "mod_access",
      "mod_fastcgi",
      "mod_simple_vhost",
      "mod_accesslog" )

      ## a static document-root, for virtual-hosting take look at the
      ## server.virtual-* options
      server.document-root = "/opt/share/www/"

      ## where to send error-messages to
      server.errorlog = "/opt/var/log/lighttpd/error.log"

      # files to check for if .../ is requested
      index-file.names = ( "index.php", "index.html",
      "index.htm", "default.htm" )

      #### accesslog module
      accesslog.filename = "/opt/var/log/lighttpd/access.log"

      ## deny access the file-extensions
      #
      # ~ is for backupfiles from vi, emacs, joe, ...
      # .inc is often used for code includes which should in general not be part
      # of the document-root
      url.access-deny = ( "~", ".inc" )

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

      ##
      # which extensions should not be handle via static-file transfer
      #
      # .php, .pl, .fcgi are most often handled by mod_fastcgi or mod_cgi
      static-file.exclude-extensions = ( ".fcgi", ".php", ".pl", ".py", ".rb" )

      ######### Options that are good to be but not neccesary to be changed
      #######

      ## bind to port (default: 80)
      server.port = 80

      ## to help the rc.scripts
      server.pid-file = "/var/run/lighttpd.pid"


      ###### virtual hosts
      ##
      ## If you want name-based virtual hosting add the next three settings
      and load
      ## mod_simple_vhost
      ##
      ## document-root =
      ## virtual-server-root + virtual-server-default-host +
      virtual-server-docroot
      ## or
      ## virtual-server-root + http-host + virtual-server-docroot
      ##
      simple-vhost.server-root = "/opt/share/www/"
      simple-vhost.default-host = "{your default domain here}"
      simple-vhost.document-root = ""

      ## virtual directory listings
      dir-listing.activate = "enable"

      #### fastcgi module
      ## read fastcgi.txt for more info
      fastcgi.server = ( ".php" =>
      ( "localhost" =>
      (
      "socket" => "/tmp/php-fastcgi.socket",
      "bin-path" => "/opt/bin/php-fcgi",
      "bin-environment" => (
      "PHP_FCGI_CHILDREN" => "4",
      "PHP_FCGI_MAX_REQUESTS" => "4000"
      )
      )
      )
      )
    Your message has been successfully submitted and would be delivered to recipients shortly.