System/OS
2003.04.23 10:27
[linux] 아파치설치/설정(CGI부분)
Views 14621 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 |
해커스랩 깨기.. 후후.. ㅋㅋ
![]() |
hooni | 2013.04.23 | 18520 |
201 | System/OS | 콘솔에서 패스워드 걸린 zip 압축하는 명령 | hooni | 2018.03.02 | 1120 |
200 | System/OS |
컴파일러 수업 자료(교재 : 컴파일러 입문)
![]() |
hooni | 2003.04.23 | 22068 |
199 | System/OS | 아파치(Apache) 인증사용(htaccess)으로 특정 디렉토리에 암호걸기 | hooni | 2013.04.23 | 13728 |
198 | System/OS |
서버 확장을 위한 두 가지 방법
![]() |
hooni | 2018.08.29 | 2258 |
197 | System/OS |
무선 인증 서버.. 김도.. ㅋㅋ
![]() |
hooni | 2013.04.23 | 17684 |
196 | System/OS |
무료로 HTTPS 적용하기 (Lets' Encrypt)
![]() |
hooni | 2017.02.16 | 2375 |
195 | System/OS |
무료로 HTTPS 적용하기 (Let's Encrypt)
![]() |
hooni | 2017.10.28 | 1671 |
194 | System/OS | 맥에서 포트 확인하고 닫기 (mac) | hooni | 2022.03.22 | 1198 |
193 | System/OS |
맥에서 파일공유 (윈도우,맥)
![]() |
hooni | 2013.04.25 | 37398 |
192 | System/OS |
맥북에서 MAC/윈도우 멀티부팅시 시간 설정
![]() |
hooni | 2013.04.23 | 29862 |
191 | System/OS | 맥 OS X 에서 스크린 화면 캡쳐 단축키 (Mac Print Screen) | hooni | 2015.07.21 | 2031 |