[HOWTO] Make lighttpd work beside custombuilds apache.
Forum Administrator's Note: Be sure to read the entire thread before using this How-To
This is at your own RISK
Prerequisite:
You should get this :
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:
Step 3: Download and compiling Lighttpd
Step 4: Installing lighttpd
Step 5: Adding the lighttpd service user
Step 6: Creating directories and downloading config files
Locate server.bind = and change it to your "lighttpd shared-ip"
Step 7: Setting up lighttpd as a service
Step 8: Creating log for your "vhost"
* 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
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 should get this :
Code:
PHP 5.2.4 (cgi-fcgi) (built: Oct 9 2007 00:28:27)
Copyright (c) 1997-2007 The PHP Group
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
Code:
groupadd lighttpd
useradd -g lighttpd -d /var/www/html -s /sbin/nologin lighttpd
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
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
Code:
mkdir /var/log/lighttpd/some.net/
chown lighttpd:lighttpd /var/log/lighttpd/some.net/
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
Last edited: