httpd.conf
ServerType standalone
ServerRoot "/usr/local"
PidFile /var/run/httpd.pid
ScoreBoardFile /var/run/httpd.scoreboard
Timeout 300
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 15
MinSpareServers 7
MaxSpareServers 11
StartServers 7
MaxClients 150
MaxRequestsPerChild 30
Port 80
User nobody
Group nobody
DocumentRoot "/usr/local/www/data"
<Directory />
Options FollowSymLinks Includes ExecCGI
AllowOverride All
</Directory>
<Directory "/usr/local/www/data">
Options Indexes FollowSymLinks ExecCGI
AllowOverride All
Order allow,deny
Allow from all
</Directory>
<IfModule mod_userdir.c>
UserDir www
</IfModule>
<Directory /*/www>
# AllowOverride FileInfo AuthConfig Limit
# Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
Options MultiViews Indexes SymLinksIfOwnerMatch ExecCGI
# <Limit GET POST OPTIONS PROPFIND>
# Order allow,deny
# Allow from all
# </Limit>
# <LimitExcept GET POST OPTIONS PROPFIND>
# Order deny,allow
# Deny from all
# </LimitExcept>
</Directory>
<IfModule mod_dir.c>
<IfModule mod_php3.c>
<IfModule mod_php4.c>
DirectoryIndex index.php index.php3 index.html index.cgi
</IfModule>
<IfModule !mod_php4.c>
DirectoryIndex index.php3 index.html
</IfModule>
</IfModule>
<IfModule !mod_php3.c>
<IfModule mod_php4.c>
DirectoryIndex index.html index.php
</IfModule>
<IfModule !mod_php4.c>
DirectoryIndex index.html
</IfModule>
</IfModule>
</IfModule>
AccessFileName .htaccess
<Files ~ "^.ht">
Order allow,deny
Deny from all
</Files>
UseCanonicalName On
<IfModule mod_mime.c>
TypesConfig /usr/local/etc/apache/mime.types
</IfModule>
DefaultType text/plain
<IfModule mod_mime_magic.c>
MIMEMagicFile /usr/local/etc/apache/magic
</IfModule>
HostnameLookups On
CustomLog /var/log/httpd-access.log combined
ServerSignature On
<IfModule mod_alias.c>
Alias /icons/ "/usr/local/www/icons/"
<Directory "/usr/local/www/icons">
Options Indexes MultiViews
AllowOverride All
Order allow,deny
Allow from all
</Directory>
ScriptAlias /cgi-bin/ "/usr/local/www/cgi-bin/"
<Directory "/usr/local/www/cgi-bin">
AllowOverride All
Options ExecCGI
Order allow,deny
Allow from all
</Directory>
</IfModule>
DefaultIcon /icons/unknown.gif
<IfModule mod_php3.c>
AddType application/x-httpd-php3 .php3
AddType application/x-httpd-php3-source .php3s
</IfModule>
<IfModule mod_php4.c>
AddType application/x-httpd-php .php .html .htm .php3
AddType application/x-httpd-php-source .phps
</IfModule>
AddType application/x-tar .tgz
AddHandler cgi-script .cgi
AddType text/html .shtml
AddHandler server-parsed .shtml
</IfModule>
<IfModule mod_setenvif.c>
BrowserMatch "Mozilla/2" nokeepalive
BrowserMatch "MSIE 4.0b2;" nokeepalive downgrade-1.0 force-response-1.0
BrowserMatch "RealPlayer 4.0" force-response-1.0
BrowserMatch "Java/1.0" force-response-1.0
BrowserMatch "JDK/1.0" force-response-1.0
</IfModule>
아파치 서버를 실행하고 나서
http://ip/cgi-bin/test.cgi
잘됩니다...
그런데
http://ip/~demold/cgi-bin/test.cgi
하면 에러가 뜹니다..
Forbidden
You don't have permission to access /~demold/test.cgi on this server.
어케 된 일이지요 ...
설정파일도 올립니다..