System/OS
2003.04.23 10:27
[linux] 아파치설치/설정(CGI부분)
조회 수 14568 댓글 0
# 아파치 환경 설정 파일의 편집
$ vi $APACHE_HOME/conf/http.conf
1. 펄의 실행(추가 작성)
AddType application/x-httpd-cgi .pl
2. 특정 디렉토리에서 gif화일을 사용하려면
ScriptAlias /cgi-bin/ "/usr/local/apache/cgi-bin/" ->
Alias /cgi-bin/ "/usr/local/apache/cgi-bin/"
3. 모든 디렉토리에서나 cgi의 실행
AddHandler cgi-script .cgi .pl
Options FollowSymLinks ExecCGI # ExecCGI 의 추가
ScriptAlias /* "/*"
<Directory /*>
Options FollowSymLinks ExecCGI Includes # 또는 Options All
AllowOverride None # 또는 AllowOverride All
Order allow,deny
Allow from all
</Directory>
4. 특정 디렉토리에서만 cgi 실행(보안문제)1
AddHandler cgi-script .cgi .pl
<Directory "/usr/local/apache/htdocs"> # 특정 디렉토리의 풀경로
Options Indexes FollowSymLinks ExecCGI
AllowOverride None
Order allow,deny
Allow from all
</Directory>
특정 디렉토리에서만 cgi 실행(안정적)2 # ScriptAlias를 이용
ScriptAlias /cgi-bin/ "/usr/local/apache/cgi-bin/"
<Directory "/usr/local/apache/cgi-bin">
AllowOverride None
Options None
Order allow,deny
Allow from all
</Directory>
사용법 http://toconet.co.kr/cgi-bin/test.cgi
5. 사용자 홈페이지에서의 cgi 실행
Addtype CGI 하면 되고요..
/home/*/public_html
<Directory /home/*/public_html>
Options Indexes FollowSymLinks Includes Exec<B><U>CGI</U></B>
AllowOverride All
order allow,deny
allow from all
</Directory>
번호 | 분류 | 제목 | 글쓴이 | 날짜 | 조회 수 |
---|---|---|---|---|---|
130 | System/OS | [linux] 기본적인 설정하기(내공쌓기) | hooni | 2003.04.23 | 13993 |
129 | System/OS | [linux] 기존 환경설정 저장하면서 커널 컴파일.. | hooni | 2003.04.23 | 13460 |
128 | System/OS | [linux] 꿀통(honeyd) 설치하기.. 메뉴얼 과정 6 | hooni | 2006.04.23 | 20219 |
127 | System/OS | [linux] 네트워크 커널 설정.. | hooni | 2003.04.23 | 16475 |
126 | System/OS | [linux] 네트웍 트래픽 모니터링(MRTG) | hooni | 2003.04.23 | 41799 |
125 | System/OS | [linux] 데비안(debian.org) 리눅스 명령어 예제 | hooni | 2006.04.23 | 10422 |
124 | System/OS | [linux] 데스크탑환경(GNOME/KDE) 바꾸기.. | hooni | 2003.04.23 | 12101 |
123 | System/OS | [linux] 랜카드 2개 설정 & iptables 로 사설 ip.. | hooni | 2003.04.23 | 14735 |
122 | System/OS | [linux] 랜카드가 2개 일 때 네트워크 설정 | hooni | 2003.04.23 | 30020 |
121 | System/OS | [linux] 리눅스 파일시스템과 디렉토리 설명 | hooni | 2013.04.23 | 26877 |
120 | System/OS | [linux] 리눅스 활용 팁^^ | hooni | 2003.04.23 | 14629 |
119 | System/OS | [linux] 리눅스, 유닉스 CPU 이용률 확인.. | hooni | 2013.04.23 | 23782 |