hosted by liquidweb


Go Back   Web Hosting Talk : Web Hosting Main Forums : VPS Hosting : VPS Tutorials : Install lighttpd+PHP5 on CentOS
Reply

VPS Tutorials Tutorials related to VPS.
Forum Jump

Install lighttpd+PHP5 on CentOS

Reply Post New Thread In VPS Tutorials Subscription
 
Send news tip View All Posts Thread Tools Search this Thread Display Modes
  #1  
Old 04-25-2011, 07:05 PM
OscarS OscarS is offline
Junior Guru Wannabe
 
Join Date: Jul 2010
Location: Mexico
Posts: 67

Install lighttpd+PHP5 on CentOS


Hi everybody this is my first tutorial I'm not an expert but hope this will be helpful for someone.

This tutorial was tested on a Xen VPS 512RAM with CentOS 5.6 64bits

Well less chat and more guide.

First we need to add working repositores.

Add repo if you are 32bits

Code:
rpm -Uhv http://apt.sw.be/redhat/el5/en/i386/rpmforge/RPMS/rpmforge-release-0.3.6-1.el5.rf.i386.rpm
Add repo if you are 64bits

Code:
rpm -Uhv http://apt.sw.be/redhat/el5/en/x86_64/rpmforge/RPMS/rpmforge-release-0.3.6-1.el5.rf.x86_64.rpm
Install lighttpd

Code:
yum install lighttpd
Once lighttpd is installed you will need complements for php (we will use PHP5)

Install PHP

Code:
yum install lighttpd-fastcgi php-cli
Now we gonna set up our lighttpd configuration

Change settings of lighttpd

Code:
nano /etc/lighttpd/lighttpd.conf
This gonna open the file configuration of lighttpd we gonna disable IPv6 if we are using IPv4 (if not skip this)

Search "server.use-ipv6 = “enable" and change for "disable"

Code:
server.use-ipv6 = "disable"
Now we gonna open the modules configuration file

Change settings of modules

Code:
nano /etc/lighttpd/modules.conf
Search

Quote:
server.modules = (
“mod_access”,
# “mod_alias”,
# “mod_auth”,
# “mod_evasive”,
# “mod_redirect”,
# “mod_rewrite”,
# “mod_setenv”,
# “mod_usertrack”,
)
and change for

Code:
server.modules = (
"mod_access",
"mod_alias",
"mod_auth",
"mod_evasive",
"mod_redirect",
"mod_rewrite",
"mod_setenv",
"mod_usertrack",
)
Note: in this step we change # in modules to active it.

now scroll down and Search

Code:
##
## FastCGI (mod_fastcgi)
##
#include “conf.d/fastcgi.conf”
and change for

Code:
##
## FastCGI (mod_fastcgi)
##
include "conf.d/fastcgi.conf"
 
fastcgi.server = ( ".php" =>
( "localhost" =>
(
"socket" => "/tmp/php-fastcgi.socket",
"bin-path" => "/usr/bin/php-cgi"
)
)
)
Now everything its ok, I recommend to you to put an index.html in var/www/lighttpd because by default lighttpd give you an 404 error (chrome show me this like broken link that was my first fail)

This tutorial is mine translate from spanish to english.

Reply With Quote


Sponsored Links
  #2  
Old 05-28-2011, 07:23 AM
swisscloud swisscloud is offline
Newbie
 
Join Date: May 2011
Location: Geneva, Switzerland
Posts: 17
Thanks for sharing. You may also want to add some php modules like mysql, curl, etc ...

Reply With Quote
  #3  
Old 06-10-2011, 07:30 AM
zFastDan zFastDan is offline
Junior Guru Wannabe
 
Join Date: Jul 2010
Location: Manchester
Posts: 55
Great tutorial.

For some reason I had to put my index.html file in /srv/www/lighttpd

But apart from that, worked on a CentOS 5 32bit VPS!

Regards,
Daniel

Reply With Quote
Sponsored Links
  #4  
Old 06-10-2011, 07:32 AM
serena85 serena85 is offline
New Member
 
Join Date: Jun 2011
Posts: 4
That is a great tutorial I have copied all

Reply With Quote
  #5  
Old 06-10-2011, 07:36 AM
cptechie cptechie is offline
Web Hosting Evangelist
 
Join Date: Jan 2011
Posts: 451
Hello,

Thanks for sharing the tutorial. It is really appreciable if members share such tutorials.

I will surely try it in my test server.

Reply With Quote
  #6  
Old 06-10-2011, 12:34 PM
OscarS OscarS is offline
Junior Guru Wannabe
 
Join Date: Jul 2010
Location: Mexico
Posts: 67
Quote:
Originally Posted by zFastDan View Post
Great tutorial.

For some reason I had to put my index.html file in /srv/www/lighttpd

But apart from that, worked on a CentOS 5 32bit VPS!

Regards,
Daniel
Ya I know, was my bad, since we can't edit our old threads...

Reply With Quote
  #7  
Old 06-17-2011, 01:58 AM
darwin7 darwin7 is offline
Junior Guru Wannabe
 
Join Date: Feb 2011
Location: EU
Posts: 63
This script includes mysql?

Reply With Quote
  #8  
Old 06-19-2011, 07:18 PM
OscarS OscarS is offline
Junior Guru Wannabe
 
Join Date: Jul 2010
Location: Mexico
Posts: 67
Quote:
Originally Posted by darwin7 View Post
This script includes mysql?
No, this doesnt include MYSQL you need to install as a single software.

Reply With Quote
  #9  
Old 07-06-2011, 02:27 PM
ziao ziao is offline
New Member
 
Join Date: Jun 2011
Posts: 2
thanks i will try it

Reply With Quote
  #10  
Old 09-09-2011, 12:34 PM
Xen Technologies Xen Technologies is offline
Temporarily Suspended
 
Join Date: Sep 2011
Posts: 10
thanks for you
will surely try it in my test server.

Reply With Quote
  #11  
Old 01-17-2012, 08:39 AM
Erawan Arif Nugroho Erawan Arif Nugroho is offline
Aspiring Evangelist
 
Join Date: Jun 2010
Location: Indonesia
Posts: 390
Is there any tutorial if I have the following case?

IPv6 Enabled VPS with /64 subnet.
More than 1 Domain name to be hosted in the VPS, for example :

I want to server each domain name with each IPv6 address I have.

Quote:
www.domaina.com = 2a02:2658:1011:1::2:1
Location = /var/www/www.domaina.com/html
Quote:
www.domainb.com = 2a02:2658:1011:1::2:2
Location = /var/www/www.domainb.com
Quote:
www.anotherdomainofmine.com = 2a02:2658:1011:1::2:3
Location = www.anotherdomainofmine.com
Quote:
www.forumwebsite.com = 2a02:2658:1011:1::2:4
Location = www.forumwebsite.com
How would the lighttpd.conf would be like?

Regards,

Erawan Arif Nugroho

Reply With Quote
  #12  
Old 02-24-2012, 09:35 PM
alsemany alsemany is offline
Web Hosting Guru
 
Join Date: Aug 2010
Location: Egypt/Cairo
Posts: 319
that's great .

I'm using kloxo , it have the option to switch from Apache to lighthttpd
however I like Apache because of the rewrite module

Reply With Quote
  #13  
Old 02-27-2012, 09:12 AM
leadtech leadtech is offline
Junior Guru Wannabe
 
Join Date: Feb 2012
Posts: 35
Thanks for sharing .. This tutorial works

Reply With Quote
Reply

Similar Threads
Thread Thread Starter Forum Replies Last Post
VPS in Japan with CentOS and Lighttpd (installed myself) - Do I really need Plesk? floridaz VPS Hosting 5 09-06-2008 02:24 AM
How to install Lighttpd in CentOS 5.2 ? mrhungpham Hosting Security and Technology 7 09-01-2008 06:16 AM
How to install PHP5 on CentOS 4? I get an error... Peppermint Hosting Security and Technology 4 06-23-2007 10:46 PM
Lighttpd on CentOS 4.4 priceww Hosting Security and Technology 0 04-07-2007 03:10 PM
centos:apache,php, yum install or source install? cchere Hosting Security and Technology 2 08-29-2006 05:14 PM

Related posts from TheWhir.com
Title Type Date Posted
Solar VPS Becomes Official Mirror for Centos and Ubuntu Web Hosting News 2013-04-16 11:03:34
Web Host Rackspace Adds FreeBSD 9, CentOS 6.3 Support to Cloud Servers Web Hosting News 2012-07-30 12:47:10
Web Host ServerPronto Donates Hosting Resources to CentOS Web Hosting News 2012-07-05 14:06:27
Web Host A2 Hosting Launches Customizable VPS Hosting Plans Web Hosting News 2012-06-07 15:11:57
Web Host NetHosting Announces Support for CentOS 6 Web Hosting News 2011-07-05 20:15:20


Tags
centos, centos lighttpd, lighttpd, lighttpd php centos

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes
Postbit Selector

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump
Login:
Log in with your username and password
Username:
Password:



Forgot Password?
Advertisement:
Web Hosting News:



 

X

Welcome to WebHostingTalk.com

Create your username to jump into the discussion!

WebHostingTalk.com is the largest, most influentual web hosting community on the Internet. Join us by filling in the form below.


(4 digit year)

Already a member?