System/OS
2003.04.23 10:27
[linux] 아파치설치/설정(CGI부분)
조회 수 14620 댓글 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>
번호 | 분류 | 제목 | 글쓴이 | 날짜 | 조회 수 |
---|---|---|---|---|---|
178 | System/OS | [doc] TCP/IP 강의 자료 (html) | hooni | 2013.04.23 | 11237 |
177 | System/OS | [doc] 네트워크 장비와 라우터 설정 방법 발표 자료 | hooni | 2013.04.23 | 14541 |
176 | System/OS | [doc] 레드햇 리눅스 메뉴얼 (html버전) | hooni | 2013.04.23 | 10513 |
175 | System/OS | [doc] 코코아 프로그래밍 for MACOS 관련 내 분량.. | hooni | 2013.04.23 | 20896 |
174 | System/OS | [doc] 피쳐셀렉션(feature selection using..) 발표 자료 | hooni | 2013.04.23 | 12608 |
173 | System/OS | [dos] 노트북 백업 스크립트 xcopy 명령 예제 | hooni | 2003.04.23 | 40868 |
172 | System/OS | [java] Tomcat/UTF-8 or All 지원 ㅎㅎ | hooni | 2013.04.23 | 16825 |
171 | System/OS | [linux] /etc/fstab 설정 방법.. ㅋㅋ | hooni | 2013.04.23 | 12145 |
170 | System/OS | [linux] apache, php, jsp 환경설정하기.. | hooni | 2003.04.23 | 15301 |
169 | System/OS | [linux] APM(apache, php, mysql) + gd 설치순서.. | hooni | 2003.04.23 | 18931 |
168 | System/OS | [linux] awk 명령어 | hooni | 2014.03.11 | 5032 |
167 | System/OS | [linux] CentOS 6.5 에서 "Bringing up interface eth0: Determining if ip address 121.78.127.197 is already in use for device eth0..." | hooni | 2014.04.05 | 4960 |