CGI »ç¿ëÇϱâ
apache ÀÇ ¼³Á¤ ÈÀÏÀÎ httpd.conf ÈÀÏÀ» ¼öÁ¤ÇÑ´Ù.
CGI¸¦ »ç¿ëÇÒ µð·ºÅ丮 : /home/USER/public_html/cgi-bin
ScriptAlias ¸¦ ¼³Á¤ÇÕ´Ï´Ù.
ServerName www.formail.com
ServerAdmin USER@formail.org.com
ScriptAlias /cgi-bin/ /home/USER/public_html/cgi-bin/
|
html ¹®¼ µð·ºÅ丮 ¼³Á¤
¾ÆÆÄÄ¡ ¼³Á¤ ÈÀϵé '/etc/httpd/conf/httpd.conf' , 'access.conf', 'srm,conf' ÀÔ´Ï´Ù.
ÇÏÁö¸¸, httpd.conf¿¡¼ ´ëºÎºÐÀÇ ¼³Á¤ÀÌ °¡´ÉÇÏ´Ù.
UserDir public_html <-- º¸Åë ÀÌ·¸°Ô µÇ¾î ÀÖÀ» °Ì´Ï´Ù. |
±×¸®°í°èÁ¤À» Ãß°¡ ÇϽøé
¿¹¸¦µé¾î abc¶ó´Â °èÁ¤À» Ãß°¡ Çß´Ù¸é
http://µµ¸ÞÀÎ/~abc ÀÌ·¸°Ô µË´Ï´Ù.
Url ¼³Á¤
http://µµ¸ÞÀÎ/~abc --> http://µµ¸ÞÀÎ/abc
srm.conf ÈÀÏÀ» ¼öÁ¤À» ÇÑ´Ù. ´ÙÀ½À» Ãß°¡ÇÑ´Ù.
Alias /abc /home/abc/public_html |
¾ÆÆÄÄ¡¸¦ ´Ù½Ã ½ÇÇà ½ÃŲ´Ù.
httpd restart or apachectl restart |
httpd.conf ¿¹Á¦
# ¾ÆÆÄÄ¡ ¼¹ö¸¦ ¼³Ä¡ÇÏ°í ³ª¼, localhost ¸¦ ÇÏ¸é µðÆúÆ®·Î ³ª¿À´Â ¹®¼°¡ ÀÖ´Â µð·ºÅ丮ÀÔ´Ï´Ù.
DocumentRoot "/home/httpd/kedu" # ¼Õ´ëÁö ¸»°í µðÆú·Î ±×³É ³ªµÓ´Ï´Ù.
#ÆÞÀ» »ç¿ëÇÒ¶§ CGI¸¦ »ç¿ëÇÒ¶§´Â ´ÙÀ½°ú °°ÀÌ ¼³Á¤À» ÇØÁÖ¾î¾ß ÇÕ´Ï´Ù.
<Directory />
Options FollowSymLinks ExecCGI
AllowOverride None
</Directory>
#
# Note that from this point forward you must specifically allow
# particular features to be enabled - so if something's not working as
# you might expect, make sure that you have specifically enabled it
# below.
#
#
# This should be changed to whatever you set DocumentRoot to.
#
<Directory "/usr/local/httpd/htdocs"> # ¼Õ´ëÁö ¸»°í µðÆú·Î ±×³É ³ªµÓ´Ï´Ù.
#
# This may also be "None", "All", or any combination of "Indexes",
# "Includes", "FollowSymLinks", "ExecCGI", or "MultiViews".
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
#À̰ÍÀº ´ÙÀ½°ú °°ÀÌ ¼³Á¤À» ÇØÁÝ´Ï´Ù.
Options Indexes FollowSymLinks Includes ExecCGI
#
# This controls which options the .htaccess files in directories can
# override. Can also be "All", or any combination of "Options", "FileInfo",
# "AuthConfig", and "Limit"
#
AllowOverride None # Åë°ú
#
# Controls who can get stuff from this server.
#
Order allow,deny # ¿ª½Ã Åë°ú
Allow from all # ¼Õ´ëÁö ¸»°Í
</Directory> # ¼Õ´ëÁö ¸»°í Åë°ú
# »ç¿ëÀÚ °èÁ¤À» ¸¸µé°í ³ª¼ À¯ÀúÀÇ index.htm ÀÌ ½ÇÇàµÇ´Â µð·ºÅ丮
UserDir public_html
#ºê¶ó¿ìÀú¸¦ ½ÇÇà ÇÒ¶§ ±âº»ÀûÀ¸·Î ÀÐ¾î µéÀÌ´Â ÈÀÏÀ» ¼³Á¤ÇÏ´Â °÷ÀÔ´Ï´Ù.
DirectoryIndex index.htm index.html index.cgi index.php index.php3
# ÆÞÀ» »ç¿ëÇÒ¶§ CGI ¸¦ »ç¿ëÇÒ¶§ ´ÙÀ½°ú °°ÀÌ ¼³Á¤À» ÇÕ´Ï´Ù.
AccessFileName .htaccess
<Files .htaccess>
Order allow,deny
Deny from all
</Files>
#php ¸¦ »ç¿ëÇÒ¶§´Â ´ÙÀ½°ú °°ÀÌ ¼³Á¤À» ÇØÁÝ´Ï´Ù.
AddType application/x-httpd-php .php3
AddType application/x-httpd-php-source .phps
AddType application/x-tar .tgz
#ÆÞ CGI¸¦ »ç¿ëÇÒ¶§´Â ´ÙÀ½°ú °°ÀÌ ¼³Á¤À» ÇØÁÝ´Ï´Ù.
AddHandler cgi-script .cgi
|