第 15 章 Lighttpd

简介:

15.1. install lighttpd

			
# cd /usr/ports/www/
# pkg_add -r lighttpd
			
		

/etc/rc.conf

			
[root@freebsd ~]# echo lighttpd_enable=\"YES\" >> /etc/rc.conf

[root@freebsd ~]# cat /etc/rc.conf
lighttpd_enable="YES"
			
		
fastcgi.server             = ( ".php" =>
                               ( "localhost" =>
                                 (
                                   "socket" => "/tmp/php-fastcgi.socket",
                                   "bin-path" => "/usr/local/bin/php-cgi"
                                 )
                               )
                            )

		
server.document-root        = "/www/htdocs/"
server.errorlog             = "/www/logs/lighttpd.error.log"
accesslog.filename          = "/www/logs/access.log"

chown -R www:www /www/
# touch /www/logs/lighttpd.error.log
# chown www:www /www/logs/lighttpd.error.log


		

start

			
freebsd0# /usr/local/etc/rc.d/spawn-fcgi start
Starting spawn_fcgi.
spawn-fcgi: child spawned successfully: PID: 79056
freebsd0# /usr/local/etc/rc.d/spawn-fcgi stop
Stopping spawn_fcgi.
Waiting for PIDS: 79056.
freebsd0# /usr/local/etc/rc.d/spawn-fcgi start
Starting spawn_fcgi.
spawn-fcgi: child spawned successfully: PID: 79084
freebsd0# /usr/local/etc/rc.d/spawn-fcgi restart
Stopping spawn_fcgi.
Starting spawn_fcgi.
spawn-fcgi: child spawned successfully: PID: 79109


# /usr/local/etc/rc.d/lighttpd start
Starting lighttpd.
			
		




原文出处:Netkiller 系列 手札
本文作者:陈景峯
转载请与作者联系,同时请务必标明文章原始出处和作者信息及本声明。

目录
相关文章
|
4月前
|
应用服务中间件 Linux 测试技术
Nginx+uWSGI
【8月更文挑战第22天】
42 6
|
Web App开发 应用服务中间件 PHP
|
Shell Python PHP
|
缓存 安全 Ubuntu
|
前端开发 Linux JavaScript
|
Web App开发 负载均衡 应用服务中间件