System/OS
2003.04.23 10:27
[linux] 아파치설치/설정(CGI부분)
Views 14625 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 |
---|---|---|---|---|---|
202 | System/OS | Apache CORS 설정 1 | hooni | 2020.09.04 | 2898 |
201 | System/OS | asx미디어 정보 기록.. | hooni | 2003.04.23 | 20605 |
200 | System/OS |
CentOS 6.5 USB 설치
6 ![]() |
hooni | 2013.12.18 | 37804 |
199 | System/OS | CentOS 에서 Cacti 설치하기 | hooni | 2015.01.02 | 1938 |
198 | System/OS |
Configure Postfix to Use Gmail SMTP on Ubuntu 18.04
![]() |
hooni | 2020.02.07 | 1497 |
197 | System/OS |
Enable Safari Hidden Debug Menu in Mac OS X
![]() |
hooni | 2017.02.07 | 1731 |
196 | System/OS |
Enable the Develop Menu in Safari
![]() |
hooni | 2017.02.07 | 1337 |
195 | System/OS |
How to Install and Use wget on Mac
![]() |
hooni | 2020.09.03 | 1540 |
194 | System/OS | How to Setup an Email Server on CentOS 7 | hooni | 2018.04.05 | 3035 |
193 | System/OS | HTTP 프로토콜 (브라우저와 웹서버 간의 통신) | hooni | 2003.04.23 | 48356 |
192 | System/OS |
HTTPS와 SSL 인증서
![]() |
hooni | 2014.03.11 | 7639 |
191 | System/OS |
iptime 공유기 해킹 기술문서
4 ![]() |
hooni | 2015.01.01 | 2087 |