P r o f e s s i o n a l — M a n a g e m e n t — S o l u t i o n s
RSS icon Email icon Home icon
  • Install and Configure lighttpd

    Posted on August 1st, 2008 Admin 2 comments

    Lighttpd is a lightweight HTTP server. It functions much the same way Apache does, but uses up far less system resources, and in most configurations, is faster. Lighttpd is used by several popular Web 2.0 sites such as YouTube, Wikipedia, and Meebo.

    The easiest, and most widely used method of installation is via your chosen distribution’s package management system. Most major distributions have lighttpd in their repositories, or other fairly easy ways of obtaining it.

    lighttpd yum Installation

    yum is the preferred installation method for RedHat Enterprise Linux, CentOS, and Fedora Core.

    Enter yum install lighttpd to install the lighttpd application
    Enter yum install lighttpd-fastcgi to install the FastCGI libraries for lighttpd
    If yum does not return any results, you will need to download lighttpd as an RPM file from DAG.

    The DAG packages for lighttpd can be found at http://dag.wieers.com/rpm/packages/lighttpd/

    Use the following commands to download the lighttpd application and the lighttpd FastCGI libraries:

    wget http://dag.wieers.com/rpm/packages/lighttpd/lighttpd-1.4.18-1.el4.rf.i386.rpm
    wget http://dag.wieers.com/rpm/packages/lighttpd/lighttpd-fastcgi-1.4.18-1.el4.rf.i386.rpm
    Once you have retrieved the lighttpd RPM files, use the following commands to complete the installation:

    rpm –Uvh lighttpd-1.4.18-1.el4.rf.i386.rpm
    rpm –Uvh lighttpd-fastcgi-1.4.18-1.el4.rf.i386.rpm

    lighttpd apt Installation

    apt-get is the preferred installation method for Debian or Ubuntu.

    Enter apt-get install lighttpd under an account with root privileges or use sudo to run the command as the root user.

    Configure lighttpd

    For this, I’m just going to go over the absolute basic configuration to get lighttpd up and running.

    More information on module-specific configuration can be found in the lighttpd documentation.

    /etc/lighttpd/lighttpd.conf will be your primary configuration file.

    lighttpd server.* Directives

    The server.* directives are absolutely required for lighttpd to start up successfully.

    server.modules is an array that tells lighttpd what modules load when it starts up.

    Simply uncomment an existing line in the default lighttpd.conf file, or add it if it isn’t there already.

    server.document-root is the default document root. The document root directive is especially important if you are not using a virtual host configuration, though it must be set even if you are.

    Advanced Installation

     Compile lighttpd from Source Compiling lighttpd from source can be useful when tweaking for absolute performance or using a recent version of lighttpd which has not been released in major distribution repositories…
     

    Share/Save/Bookmark

     

    2 responses to “Install and Configure lighttpd” RSS icon

    • is there a way to turn off apache after installing lighttpd say in cpanel so it does not restart after a upcp update?

    • Yes you need to stop apache first

      service httpd stop

      Then disable the service using the following command

      chkconfig httpd off

      That should be all i think.


    Leave a reply

    You must be logged in to post a comment.