System/OS
2003.04.23 10:27
[linux] 아파치설치/설정(CGI부분)
조회 수 14572 댓글 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>
번호 | 분류 | 제목 | 글쓴이 | 날짜 | 조회 수 |
---|---|---|---|---|---|
142 | System/OS | [linux] 콘솔/Xwindow 에서 PC스피커 소리 없애기 | hooni | 2003.04.23 | 16358 |
141 | System/OS | [linux] 패킷 스니퍼링 | hooni | 2003.04.23 | 16329 |
140 | System/OS | [windows] 원격 데스크탑(터미널 서비스) 포트 변경 | hooni | 2013.04.23 | 16307 |
139 | System/OS | [owasp] 10대 웹어플리케이션 보안 취약 | hooni | 2013.04.23 | 15919 |
138 | System/OS | 라우팅 경로 결정 영향 요소 ㅋㅋ | hooni | 2013.04.23 | 15861 |
137 | System/OS | [router] 설정과 기본 명령어들 모음 | hooni | 2013.04.23 | 15677 |
136 | System/OS | [linux] 쉘스크립트 expr | hooni | 2014.03.11 | 15634 |
135 | System/OS | [linux] 종료와 종료코드 확인(환경변수에서) | hooni | 2003.04.23 | 15555 |
134 | System/OS | [linux] 특수문자 환경 설정(stty) | hooni | 2003.04.23 | 15293 |
133 | System/OS | [linux] apache, php, jsp 환경설정하기.. | hooni | 2003.04.23 | 15249 |
132 | System/OS | [linux] 센드메일 동적릴레이 설치 | hooni | 2003.04.23 | 15233 |
131 | System/OS | [linux] 아파치설치/설정 - 사용인증 | hooni | 2003.04.23 | 15090 |