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] ssh에서 원격 파일 전송하기.. | hooni | 2013.04.23 | 14201 |
141 | System/OS | [linux] The Ultimate Wget Download Guide With 15 Awesome Examples | hooni | 2020.05.26 | 969 |
140 | System/OS | [linux] vi 편집기 간단한 명령과 환경설정 | hooni | 2003.04.23 | 11404 |
139 | System/OS | [linux] wget 명령 사용 예제 | hooni | 2020.05.26 | 1581 |
138 | System/OS | [linux] Xwindow/Xmanager 사용 | hooni | 2003.04.23 | 13380 |
137 | System/OS | [linux] X환경 GNOME에서 KDE로 바꾸는 법.. | hooni | 2013.04.23 | 12408 |
136 | System/OS | [linux] yum 업데이트 시 커널 제외하기 | hooni | 2014.09.11 | 1386 |
135 | System/OS | [linux] 간단한 find 명령어 설명(업데이트 해야 함) | hooni | 2013.04.23 | 9164 |
134 | System/OS | [linux] 간단한 NAT 설정 script | hooni | 2003.04.23 | 12644 |
133 | System/OS | [linux] 간단한 vi편집기 사용 명령 | hooni | 2003.04.23 | 13520 |
132 | System/OS | [linux] 계정관리하기(내공쌓기) | hooni | 2003.04.23 | 13258 |
131 | System/OS | [linux] 기본 명령어 (내공쌓기) | hooni | 2003.04.23 | 14375 |