View Single Post

  #3 (permalink)  
Old 11-02-2007, 04:14 AM
TECK TECK is offline
Junior Member
User
 
Join Date: Apr 2007
My distro: CentOS 5
Posts: 9
Rep Power: 0
TECK is on a distinguished road
Default

Thanks for the reply, Vivek. I run a CentOS 5 box.
The steps listed in the first post are the only ones I performed.
All files/dirs are owned by root:root except the log lighty files (lighttpd:lighttpd).
Selinux is enabled.
PHP and MySQL are on the same partition.

The chrooted phpinfo:
phpinfo()

The "missing" library:
Code:
[root@localhost ~]# locate libmysqlclient.so.15
/srv/usr/lib/mysql/libmysqlclient.so.15
/usr/lib/mysql/libmysqlclient.so.15
/usr/lib/mysql/libmysqlclient.so.15.0.0
My lighty configuration:
Code:
# lighttpd configuration file
#
# use it as a base for lighttpd 1.0.0 and above
#
# $Id: lighttpd.conf,v 1.7 2004/11/03 22:26:05 weigon Exp $

server.modules = (
	"mod_rewrite",
#	"mod_redirect",
#	"mod_alias",
	"mod_access",
#	"mod_cml",
#	"mod_trigger_b4_dl",
#	"mod_auth",
	"mod_status",
#	"mod_setenv",
	"mod_fastcgi",
#	"mod_proxy",
#	"mod_simple_vhost",
#	"mod_evhost",
#	"mod_userdir",
#	"mod_cgi",
#	"mod_compress",
#	"mod_ssi",
#	"mod_usertrack",
#	"mod_expire",
#	"mod_secdownload",
#	"mod_rrdtool",
	"mod_accesslog"
)

server.port					= 80
server.username				= "lighttpd"
server.groupname			= "lighttpd"
server.tag					= "lighttpd"

server.chroot				= "/srv"
server.pid-file				= "/var/run/lighttpd.pid"
server.document-root		= "/var/www/html/"
server.errorlog				= "/var/log/lighttpd/error.log"
accesslog.filename			= "/var/log/lighttpd/access.log"

#server.bind				= "grisu.home.kneschke.de"
#server.error-handler-404	= "/error-handler.html"
#server.error-handler-404	= "/error-handler.php"

index-file.names = (
	"index.php",
	"index.html",
	"index.htm",
	"default.htm"
)

mimetype.assign = (
	".pdf"		=> "application/pdf",
	".sig"		=> "application/pgp-signature",
	".spl"		=> "application/futuresplash",
	".class"	=> "application/octet-stream",
	".ps"		=> "application/postscript",
	".torrent"	=> "application/x-bittorrent",
	".dvi"		=> "application/x-dvi",
	".gz"		=> "application/x-gzip",
	".pac"		=> "application/x-ns-proxy-autoconfig",
	".swf"		=> "application/x-shockwave-flash",
	".tar.gz"	=> "application/x-tgz",
	".tgz"		=> "application/x-tgz",
	".tar"		=> "application/x-tar",
	".zip"		=> "application/zip",
	".mp3"		=> "audio/mpeg",
	".m3u"		=> "audio/x-mpegurl",
	".wma"		=> "audio/x-ms-wma",
	".wax"		=> "audio/x-ms-wax",
	".ogg"		=> "application/ogg",
	".wav"		=> "audio/x-wav",
	".gif"		=> "image/gif",
	".jpg"		=> "image/jpeg",
	".jpeg"		=> "image/jpeg",
	".png"		=> "image/png",
	".xbm"		=> "image/x-xbitmap",
	".xpm"		=> "image/x-xpixmap",
	".xwd"		=> "image/x-xwindowdump",
	".css"		=> "text/css",
	".html"		=> "text/html",
	".htm"		=> "text/html",
	".js"		=> "text/javascript",
	".asc"		=> "text/plain",
	".c"		=> "text/plain",
	".cpp"		=> "text/plain",
	".log"		=> "text/plain",
	".conf"		=> "text/plain",
	".text"		=> "text/plain",
	".txt"		=> "text/plain",
	".dtd"		=> "text/xml",
	".xml"		=> "text/xml",
	".mpeg"		=> "video/mpeg",
	".mpg"		=> "video/mpeg",
	".mov"		=> "video/quicktime",
	".qt"		=> "video/quicktime",
	".avi"		=> "video/x-msvideo",
	".asf"		=> "video/x-ms-asf",
	".asx"		=> "video/x-ms-asf",
	".wmv"		=> "video/x-ms-wmv",
	".bz2"		=> "application/x-bzip",
	".tbz"		=> "application/x-bzip-compressed-tar",
	".tar.bz2"	=> "application/x-bzip-compressed-tar"
)

mimetype.use-xattr			= "enable"
url.access-deny				= ("~", ".inc")

$HTTP["remoteip"] == "127.0.0.0/8" {
	status.status-url		= "/server-status"
}

$HTTP["url"] =~ "\.pdf$" {
	server.range-requests	= "disable"
}

$HTTP["host"] =~ "192.168.1.3" {
	url.rewrite-once = (
		"^/?$"				=> "/wp/index.php",
		"^/wp/(wp-.+)$"		=> "$0",
		"^/wp/xmlrpc.php"	=> "$0",
		"^/wp/sitemap.xml"	=> "$0",
		"^/wp/(.+)/?$"		=> "/wp/index.php/$1"
	)
}

static-file.exclude-extensions	= (".php", ".pl", ".fcgi")

fastcgi.server = (
	".php" => (
		"localhost" => (
			"socket"	=> "/tmp/php-fastcgi.sock",
			"bin-path"	=> "/usr/bin/php-cgi",
			"max-procs"	=> 2,
			"bin-environment" => (
				"PHP_FCGI_CHILDREN"		=> "16",
				"PHP_FCGI_MAX_REQUESTS"	=> "10000"
			),
			"bin-copy-environment"	=> ("PATH", "SHELL", "USER"),
			"broken-scriptfilename"	=> "enable"
		)
	)
)
__________________
yqed.com (why queued) - my blog

Last edited by TECK; 11-02-2007 at 04:21 AM..
Reply With Quote