Categories
HowTos Linux

Running Lighttpd and Apache on same port, same Server ( CEntOS 6 / RHEL )

In this tutorial i will tell you how to configure Lighttpd and Apache on same port 80 on same server. In our case, we have CentOS 6 on our server but you can follow this for any Linux flavor e.g Ubuntu/BackTrack Linux etc.

Requirements :

  • Two Internet Public IPs ( Configured on eth0 and eth0:0)
  • Lighttpd
  • Apache

Apache & Lighttpd Installation :

yum install httpd lighttpd
chkconfig lighttpd on
chkconfig httpd on
ifconfig eth0 123.45.67.8 up

ifconfig eth0:0 123.45.67.9 up

You can configure these IPs in /etc/sysconfig/network-scripts/ifcfg-eth0 and /etc/sysconfig/network-scripts/ifcfg-eth0:0

Configure httpd to Listen on 123.45.67.8

vim /etc/httpd/conf/httpd.conf

Uncomment and update this line;

Listen 123.45.67.8:80

/etc/init.d/httpd restart

Configure lighttpd to Listen on 123.45.67.9

vim /etc/lighttpd/lighttpd.conf

Uncomment and update " server.bind = "

server.bind  = 123.45.67.9

/etc/init.d/lighttpd restart

One reply on “Running Lighttpd and Apache on same port, same Server ( CEntOS 6 / RHEL )”

Comments are closed.