2009. 2. 10. 15:56
Linux
Apache 설치 <아래 링크 참조>
FastCGI 설치
설치파일 다운로드
다온로드 된 파일 압축 풀기
# tar -xvfz fcgi-2.4.0.tar.gz
# tar -xvfz mod_fastcgi-2.4.6.tar.gz
# tar -xvfz mod_fastcgi-2.4.6.tar.gz
소스 컴파일 및 설치
# cd fcgi-2.4.0 (fcgi-2.4.0.tar.gz 압축 파일을 푼 디렉토리 이동)
# ./configure --prefix=/usr/local
# make
# make install
# make
# make install
# cd mod_fastcgi-2.4.6
# cp MakefileAP2 Makefile
# make top_dir=/usr/local/apache
# make install top_dir=/usr/local/apache
# cp MakefileAP2 Makefile
# make top_dir=/usr/local/apache
# make install top_dir=/usr/local/apache
fcgi 가 동작될 디렉토리 생성(기존 디렉토리 사용가능)
ex) /usr/local/apache/htdocs/fcgi 디렉토리 생성
httpd.conf 파일 수정 (아래 내용 추가)
LoadModule fastcgi_module modules/mod_fastcgi.so
FastCgiIpcDir /tmp/
FastCgiIpcDir /tmp/
ScriptAlias /fcgi "/usr/local/apache/htdocs/fcgi"
<Directory "/usr/local/apache/htdocs/fcgi">
AllowOverride None
Options +ExecCGI
Order allow,deny
Allow from all
AddHandler fastcgi-script .fcgi
</Directory>
AllowOverride None
Options +ExecCGI
Order allow,deny
Allow from all
AddHandler fastcgi-script .fcgi
</Directory>
FastCGI 동작 테스트
fcgi-2.4.0.tar.gz 압축 파일을 푼 디렉토리 이동
# cd fcgi-2.4.0
# cp ./examples/.libs/echo-x /usr/local/apache/htdocs/fcgi/echo-x.fcgi
웹에서 동작 확인
http://localhost/fcgi/echo-x.fcgi
아래와 같은 화면 출력시 성공