Install lighttpd with php Print E-mail
Written by Administrator   
Tuesday, 06 March 2007

About lighttpd:

Security, speed, compliance, and flexibility--all of these describe
LightTPD which is rapidly redefining efficiency of a webserver; as it
is designed and optimized for high performance environments. With a
small memory footprint compared to other web-servers, effective
management of the cpu-load, and advanced feature set (FastCGI, CGI,
Auth, Output-Compression, URL-Rewriting and many more) LightTPD is the
perfect solution for every server that is suffering load problems.
And best of all it's Open Source licensed under the revised BSD license. 

This tutorial is tested on CentOS 3.3, but it will works with other distributions (like fedora, redhat, centos)

1. Download lighttpd (for gcc < 2.4 use 1.4.x version)

wget http://www.lighttpd.net/assets/2007/1/29/lighttpd-1.4.13.tar.gz

 2. Decompress and install

tar -xzvf lighttpd-1.4.13.tar.gz
cd lighttpd-1.4.13
./configure && make && make install
sed -e 's/FOO/lighttpd/g' doc/rc.lighttpd > /etc/init.d/lighttpd
chmod a+rx /etc/init.d/lighttpd
cp -p doc/sysconfig.lighttpd /etc/sysconfig/lighttpd
install -Dp ./doc/lighttpd.conf /etc/lighttpd/lighttpd.conf

 3. Download and install php as a cgi module

wget http://cz.php.net/get/php-5.2.1.tar.bz2/from/this/mirror
tar -xjvf php-5.2.1.tar.bz2
cd php-5.2.1
make clean
./configure --enable-fastcgi --enable-discard-path --enable-force-redirect
make && make install

 4. Now edit this files

[/usr/local/lib/php.ini]
cgi.fix_pathinfo = 1

[/etc/lighttpd/lighttpd.conf]
server.modules = (
                   "mod_fastcgi",
                 )

fastcgi.server = ( ".php" => ((
                     "bin-path" => "/path/to/php-cgi",
                     "socket" => "/tmp/php.socket"
                 )))
 

 5. create dirs pages and logs

cd /
mkdir www
cd www

mkdir pages
mkdir logs
chmod 777 logs

 You are done, now start lighttpd with command lighttpd -f /etc/lighttpd/lighttpd.cond or /etc/init.d/lighttpd

 


Add as favourites (81) | Quote this article on your site | Views: 800

Be first to comment this article
RSS comments

Write Comment
  • Please keep the topic of messages relevant to the subject of the article.
  • Personal verbal attacks will be deleted.
  • Please don't use comments to plug your web site. Such material will be removed.
  • Just ensure to *Refresh* your browser for a new security code to be displayed prior to clicking on the 'Send' button.
  • Keep in mind that the above process only applies if you simply entered the wrong security code.
Name:
E-mail
Homepage
Title:
BBCode:Web AddressEmail AddressLoad Image from WebBold TextItalic TextUnderlined TextQuoteCodeOpen ListList ItemClose List
Comment:



Code:* Code
I wish to be contacted by email regarding additional comments

Powered by AkoComment Tweaked Special Edition v.1.4.5

Last Updated ( Tuesday, 06 March 2007 )
 
< Prev   Next >
Main Menu
Home
Our Services
Contact Us
Search
News Feeds
Our offers
Linux Tutorials
Affiliate program
Links
CarTube.co.cc
PetTube.co.cc
Slick RSS
GetAFreelancer.com New Projects
Latest projects published at GetAFreelancer.com
ScriptLance Projects
The newest projects posted on ScriptLance.
Google AdSense
Last comments
Howto install memcached, setup...
Thanks! :)
08/05/08 09:38 More...
By Jupp

Howto install memcached, setup...
wery good site
26/01/08 12:18 More...
By u26stycznia2008

Script installation Services
Comment 13 2008
Helo1l, great site!
13/10/07 10:10 More...
By John 200809

Visitors Counter
73789 Visitors
Joomla Template by Joomlashack
components joomla modules Joomla Templates Joomla tutorials