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>
번호 | 분류 | 제목 | 글쓴이 | 날짜 | 조회 수 |
---|---|---|---|---|---|
202 | System/OS | Apache CORS 설정 1 | hooni | 2020.09.04 | 2721 |
201 | System/OS | asx미디어 정보 기록.. | hooni | 2003.04.23 | 20534 |
200 | System/OS | CentOS 6.5 USB 설치 6 | hooni | 2013.12.18 | 37680 |
199 | System/OS | CentOS 에서 Cacti 설치하기 | hooni | 2015.01.02 | 1770 |
198 | System/OS | Configure Postfix to Use Gmail SMTP on Ubuntu 18.04 | hooni | 2020.02.07 | 1256 |
197 | System/OS | Enable Safari Hidden Debug Menu in Mac OS X | hooni | 2017.02.07 | 1153 |
196 | System/OS | Enable the Develop Menu in Safari | hooni | 2017.02.07 | 1079 |
195 | System/OS | How to Install and Use wget on Mac | hooni | 2020.09.03 | 1289 |
194 | System/OS | How to Setup an Email Server on CentOS 7 | hooni | 2018.04.05 | 2790 |
193 | System/OS | HTTP 프로토콜 (브라우저와 웹서버 간의 통신) | hooni | 2003.04.23 | 48251 |
192 | System/OS | HTTPS와 SSL 인증서 | hooni | 2014.03.11 | 7548 |
191 | System/OS | iptime 공유기 해킹 기술문서 4 | hooni | 2015.01.01 | 1941 |