System/OS
2003.04.23 10:27
[linux] 아파치설치/설정(CGI부분)
Views 14615 Comment 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>
No. | Category | Subject | Author | Date | Views |
---|---|---|---|---|---|
142 | System/OS | [linux] 메타(기호)문자의 의미와 사용 | hooni | 2003.04.23 | 16451 |
141 | System/OS | [linux] 프로세스 상태확인(ps) | hooni | 2003.04.23 | 12763 |
140 | System/OS | [linux] 종료와 종료코드 확인(환경변수에서) | hooni | 2003.04.23 | 15608 |
139 | System/OS | [linux] 셀 스크립트 if, for, case in.. | hooni | 2003.04.23 | 13738 |
138 | System/OS | [linux] 스케쥴링 순서(nice) 변경하기 | hooni | 2003.04.23 | 12596 |
137 | System/OS | [linux] 기존 환경설정 저장하면서 커널 컴파일.. | hooni | 2003.04.23 | 13518 |
136 | System/OS | [linux] Proftpd 설치 가이드 | hooni | 2003.04.23 | 13070 |
135 | System/OS | [sql] 내 방명록 답글 찾는 쿼리문.. (JOIN 구문) | hooni | 2003.04.23 | 12913 |
134 | System/OS | [sql] alter table 쿼리 예제 | hooni | 2003.04.23 | 12515 |
133 | System/OS | [dos] 노트북 백업 스크립트 xcopy 명령 예제 | hooni | 2003.04.23 | 40860 |
132 | System/OS | [linux] 터미널에서 문자 깨질 때 설정 ㅋㅋ | hooni | 2003.04.23 | 13957 |
131 | System/OS | [linux] root도 삭제하지 못하는 파일 속성 | hooni | 2003.04.23 | 12453 |