install lighttpd

source : http://download.lighttpd.net/lighttpd/

case : centos

wget http://download.lighttpd.net/lighttpd/releases-1.4.x/lighttpd-1.4.28.tar.gz
tar xvfz lighttpd-1.4.28.tar.gz
cd lighttpd-1.4.28
./configure
make
make install

referance : http://redmine.lighttpd.net/projects/lighttpd/wiki/InstallFromSource

1. init script 생성

sed -e 's/FOO/lighttpd/g' doc/rc.lighttpd.redhat > /etc/init.d/lighttpd
chmod a+rx /etc/init.d/lighttpd
cp -p doc/sysconfig.lighttpd /etc/sysconfig/lighttpd
install -Dp ./doc/lighttpd.conf /etc/lighttpd/lighttpd.conf

2. 실행경로 에러 수정

vi /etc/init.d/lighttpd

lightpd="/usr/local/sbin/lighttpd" # 이부분 수정

3. 설정파일 수정

vi /etc/lighttpd/lighttpd.conf

## A static document-root. For virtual hosting take a look at the
## mod_simple_vhost module.
server.document-root        = "/var/www/html/"
## where to send error-messages to
server.errorlog             = "/var/log/lighttpd/error.log"

4. php 사용을 위해선 다음과 같이 한다.

yum install php php-dev
vi /etc/lighttpd/lighttpd.conf
server.modules              = (
                                "mod_rewrite", # 주석을 풀어준다
#                               "mod_redirect",
#                               "mod_alias",
                                "mod_access",
#                               "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" )

# 다음 문자을 추가준다
fastcgi.server = ( ".php" => ((
                     "bin-path" => "/usr/bin/php-cgi",
                     "socket" => "/tmp/php.socket"
                 )))

글쓴이

yupmin

Inside Deep Throat.

답글 남기기

이메일 주소는 공개되지 않습니다. 필수 필드는 *로 표시됩니다

이 사이트는 스팸을 줄이는 아키스밋을 사용합니다. 댓글이 어떻게 처리되는지 알아보십시오.