[HOWTO] Make lighttpd work with apache custombuild.

@jack sparrow:

What files? Please point to a specific post in the thread, either by link or post number in the thread.

Thanks.

Jeff
 
is lighttpd work better on upload and download server instead of httpd(apache) ?
 
ho yes.. lighthttpd can receive many more request and its use less of cpu !

but you can have some probleme with url rewriting and its dont use file .htaccess.. so if you run joomla with url rewriting , you need to modify something ..

another one very good for big website is ngnix

ngnix.org

ngnix receive a flood of request on port 80 and he going to run well again !

he can manage many thousands of request !

but its can be cool if someone can post HOW-TO for mod_rewrite in lighthttpd with example for joomla..
 
how can i replace apache with lighttpd?
becasue we have only one ip address on our server and :

Step 2:
Disable Listen 80 in the /etc/httpd/conf/httpd.conf
And add Listen IP1:80, Listen IP2:80 for the ips that use Apache.
The Lighttpd IP must not be here.
 
Forum Administrator's Note: Be sure to read the entire thread before using this How-To

This is at your own RISK

Prerequisite:
  • Custombuild with php5-cgi option Link
  • DirectAdmin
You can check this by typing this in your shell: php-cgi -v
You should get this :
Code:
PHP 5.2.4 (cgi-fcgi) (built: Oct  9 2007 00:28:27)
Copyright (c) 1997-2007 The PHP Group
This may not be a perfect solution, but it works very nice for me.
So any suggestion is welcome

Step 1:
1.1 - Decide for what ip you are going to use as shared-ip for lighttpd
1.2 - Make sure its free in the directadmin admins´s ip-managment.
1.3 - Go to Admin´s reseller and then ip-managment. find the lighttpd ip
1.4 - Make the ip shared.

Step 1.2 to 1.4 isnt the way i have done it. It just was logical for me.
Gimme inputs.

Step 2:
Disable Listen 80 in the /etc/httpd/conf/httpd.conf
And add Listen IP1:80, Listen IP2:80 for the ips that use Apache.
The Lighttpd IP must not be here.

Example:
Code:
Listen 82.10.10.10:80
Listen 82.10.10.11:80
Listen 82.10.10.12:80


Step 3: Download and compiling Lighttpd

Code:
cd /usr/local/src
wget [URL]http://www.lighttpd.net/download/lighttpd-1.4.18.tar.gz[/URL]
tar -zxvf lighttpd-1.4.18.tar.gz
cd lighttpd-1.4.18
Code:
./configure --host=i686-redhat-linux-gnu \
--build=i686-redhat-linux-gnu \
--target=i386-redhat-linux \
--program-prefix= --prefix=/usr \
--exec-prefix=/usr \
--bindir=/usr/bin \
--sbindir=/usr/sbin \
--sysconfdir=/etc \
--datadir=/usr/share \
--includedir=/usr/include \
--libdir=/usr/lib \
--libexecdir=/usr/libexec \
--localstatedir=/var \
--sharedstatedir=/usr/com \
--mandir=/usr/share/man \
--infodir=/usr/share/info \
--with-openssl \
--with-pcre \
--with-zlib \
--with-bzip2 \
--disable-ipv6 \
--with-PACKAGE=mod_redirect \
--with-rewrite \
--with-redirect \
--with-ssi


Step 4: Installing lighttpd

Code:
make
make install
Step 5: Adding the lighttpd service user
Code:
groupadd lighttpd
useradd -g lighttpd -d /var/www/html -s /sbin/nologin lighttpd
Step 6: Creating directories and downloading config files
Code:
mkdir /etc/lighttpd/
mkdir /var/log/lighttpd
chown lighttpd:lighttpd /var/log/lighttpd
cd /etc/lighttpd
wget http://blorp.info/files/conf/lighttpd/lighttpd.conf
chown lighttpd:lighttpd  /etc/lighttpd/lighttpd.conf
mkdir vhosts
cd vhosts
wget http://blorp.info/files/conf/lighttpd/lighttpd.vhost.conf
Locate server.bind = and change it to your "lighttpd shared-ip"

Step 7: Setting up lighttpd as a service
Code:
cd /etc/init.d/
wget http://blorp.info/files/conf/init.d/lighttpd
chmod +x lighttpd
Step 8: Creating log for your "vhost"
Code:
mkdir /var/log/lighttpd/some.net/
chown lighttpd:lighttpd /var/log/lighttpd/some.net/
* This must match the logfolders you set in the domain.vhost.conf

Step 9: Files to check that match your systems setup
/etc/httpd/conf/httpd.conf
/etc/lighttpd.conf
/etc/lighttpd.conf/vhosts/*.vhost.conf
/etc/init.d/lighttpd

I guess i be editing this a little when i see errors, hopefully i get some nice inputs from you guys

Please edit this thread, i want to use lighthttpd
thanks...
 
Back
Top