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>
번호 | 분류 | 제목 | 글쓴이 | 날짜 | 조회 수 |
---|---|---|---|---|---|
94 | System/OS | [linux] 초간단 Postfix, Covecot, SSL/TLS (SMTP) | hooni | 2017.12.11 | 9322 |
93 | System/OS | [linux] 초간단 SquirrelMail 설치/설정 (다람쥐 메일) | hooni | 2017.12.11 | 4456 |
92 | System/OS | [linux] 최소한의 커널 설정(커널설치 전체과정) | hooni | 2003.04.23 | 17395 |
91 | System/OS | [linux] 커널 컴파일, 설정 | hooni | 2003.04.23 | 17845 |
90 | System/OS | [linux] 콘솔 기본언어 설정 방법 | hooni | 2013.04.23 | 12826 |
89 | System/OS | [linux] 콘솔/Xwindow 에서 PC스피커 소리 없애기 | hooni | 2003.04.23 | 16352 |
88 | System/OS | [linux] 터미널에서 문자 깨질 때 설정 ㅋㅋ | hooni | 2003.04.23 | 13914 |
87 | System/OS | [linux] 텔넷, FTP 텍스트 모드에서 사용 | hooni | 2003.04.23 | 11939 |
86 | System/OS | [linux] 특수문자 환경 설정(stty) | hooni | 2003.04.23 | 15273 |
85 | System/OS | [linux] 특정 문자열 포함된 파일 찾는 명령어 | hooni | 2013.10.16 | 30609 |
84 | System/OS | [linux] 파일내 문자열 찾아 바꾸기 | hooni | 2013.04.23 | 12195 |
83 | System/OS | [linux] 패킷 스니퍼링 | hooni | 2003.04.23 | 16315 |