Lightttpd - PHP working

Discussion in 'Linux' started by wim, Sep 2, 2008.

  1. wim

    wim

    Joined:
    Aug 26, 2008
    Messages:
    9
    Likes Received:
    0
    For those interested , I installed Lighttpd an PHP (5.3 no less) on the Aspire 1.

    Preliminary : this is not for the fainthearted , a certain degree of Linux adminstration knowledge will help.

    1. Installation Lighttpd

    Prerequisites :

    yum install gcc
    yum install pcre-devel
    yum install zlib-devel
    yum install bzip2-devel
    yum install make

    Manual followed : http://trac.lighttpd.net/trac/wiki/Tuto ... ttpdAndPHP

    Grab the latest tarball for lighttpd (in my case 1.4.19)

    Make sure you get the setting in the configuration file OK. I copied the default conf file from the doc directory to a directory conf and edited the file. Basically, it worked with the default settings.

    If all goes well you should be able to start the webserver with
    lighttpd -f </path/to/config/file>

    If you add -t to the command , a syntax check will be performed.

    Check with ps -ef to see whether it runs ok and check whether something shows up if you browse to http://localhost. You might want to create a small html page for this.

    2. Installation PHP

    Prerequisites:

    yum install libxml2-devel

    Specifically for PHP5.3 , fastcgi is enabled by default , so no need to configure with '--enable-fast-cgi'.

    ./configure
    make
    make test
    su -
    make install

    By default the php-cgi executable resides in /usr/local/bin , which is what you can also find in the configuration file (lighttpd.conf in my case). You uncomment the fast-cgi settings and tweak them to resemble the ones found on this page : http://www.php.net/manual/en/install.un ... tpd-14.php

    Make sure you have a valid index.php file ( <?php echo phpinfo(); ?> in the document root.

    Restart the server ( pkill lighttpd , lighttpd -f </path/to/conf/file> ) enter http://localhost/index.php and KABOOM , PHP enabled.

    If you have further questions, I'll try to help.
     
    wim, Sep 2, 2008
    #1
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.