System/OS
2003.04.23 10:27
[linux] 아파치설치/설정(CGI부분)
조회 수 14569 댓글 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>
번호 | 분류 | 제목 | 글쓴이 | 날짜 | 조회 수 |
---|---|---|---|---|---|
333 | Develop | [c] 소수 구하기 #1 (한정된 숫자 내에 있는 소수 걸러내기) | hooni | 2003.04.23 | 7811 |
332 | Develop | [c] 셀프 넘버(Self Number) 구하기 1 | hooni | 2016.09.09 | 2264 |
331 | Develop | [c] 서비스 거부 공격(DoS;Denial of Service) 간단 소스.. ㅋㅋ | hooni | 2013.04.23 | 6716 |
330 | Develop | [c] 분수계산 함수^^ | hooni | 2003.04.23 | 10055 |
329 | Develop | [c] 베지어 곡선(Bézier curve) 알고리즘 | hooni | 2013.04.23 | 8557 |
328 | Develop | [c] 베이지언(Bayesian) 패턴인식 과제 ㅋㅋ | hooni | 2013.04.23 | 7095 |
327 | Develop | [c] 반올림 함수!! ㅋㅋ | hooni | 2003.04.23 | 8084 |
326 | Develop | [c] 바로 보고 정리할 것.. ㅋㄷㅋㄷ | hooni | 2013.04.23 | 7137 |
325 | Develop | [c] 민수형 소스(도메인소켓포함) | hooni | 2013.04.23 | 6522 |
324 | Develop | [c] 민수형 libipq 샘플 소스 ㅋㅋ | hooni | 2003.04.23 | 14113 |
323 | Develop | [c] 문자열 컨트롤 함수로 만든 프로그램들.. | hooni | 2003.04.23 | 6786 |
322 | Develop | [c] 문자열 치환해주는 str_replace() 함수 | hooni | 2013.04.23 | 7385 |