안녕하세요...
저는 조그만 인터넷 회사에 다니는 사람입니다.
프로그래머가 나가는 바랍에 모든것이 마비가 되었습니다.
홈페이지 를 주문받아서 도메인도 등록하고 네임서버 변경까지
해놓았는데...
웹호스팅하는 방법을 잘몰라서 이렇게 적습니다.
책을 찾아가면서 하고 있는데 잘되지 않네요.
저의 서버에 셋팅된 내용을 적어보겠습니다.
호스팅을 원하는 도메인 3개 가 있습니다.
편의상 호스팅 하고자 하는 도메인을 aaa.com
이라고 하겠습니다. 그리고 네임서버도메인은 ns.hankooklinux.com
입니다.
제가 알기로는 zone 파일을 생성하는 것도 거기에 맞게 conf파일을
수정하는걸로 알고있습니다. 아래에 제가 잡아놓은 것을 보여드리겠습니다.
그리고 또 한가지 궁금한게 ns.hankooklinux.com의 홈페이지는
어디로 설정을 해놓아야 맞는 것인지요.
원래 아파치 설치하면 루트디렉토리 경로가 /home/httpd/html로 잡혀있든데
저는 일반 계정을 하나 만들어서 (hankooklinux)사용하거든요.
루트리렉토리 경로를 /home/hankooklinux/public_html/ 로 잡하놓았습니다.
그런데 이것도 잘않되네요.. 처음은 되었는데...
자세히 아시는 분은 제발 설명좀 해주세요.
#
# 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 MultiViews
#
# 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>
#
# UserDir: The name of the directory which is appended onto a user's home
# directory if a ~user request is received.
#
<IfModule mod_userdir.c>
UserDir public_html
</IfModule>
#
# Control access to UserDir directories. The following is an example
# for a site where these directories are restricted to read-only.
#
#<Directory /home/*/public_html>
# AllowOverride FileInfo AuthConfig Limit
# Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
# <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>
#
# DirectoryIndex: Name of the file or files to use as a pre-written HTML
# directory index. Separate multiple entries with spaces.
#
<IfModule mod_dir.c>
DirectoryIndex index.php index.php3 index.html
</IfModule>
#
# AccessFileName: The name of the file to look for in each directory
# for access control information.
#
AccessFileName .htaccess
#
# The following lines prevent .htaccess files from being viewed by
# Web clients. Since .htaccess files often contain authorization
# information, access is disallowed for security reasons. Comment
# these lines out if you want Web visitors to see the contents of
# .htaccess files. If you change the AccessFileName directive above,
# be sure to make the corresponding changes here.
#
# Also, folks tend to use names such as .htpasswd for password
# files, so this will protect those as well.
#
<Files ~ "^.ht">
Order allow,deny
Deny from all
</Files>
/Vir
# mod_mime_magic is not part of the default server (you have to add
# it yourself with a LoadModule [see the DSO paragraph in the 'Global
# Environment' section], or recompile the server and include mod_mime_magic
# as part of the configuration), so it's enclosed in an <IfModule> container.
# This means that the MIMEMagicFile directive will only be processed if the
# module is part of the server.
#
<IfModule mod_mime_magic.c>
MIMEMagicFile /usr/local/apache/conf/magic
</IfModule>
#
# HostnameLookups: Log the names of clients or just their IP addresses
# e.g., www.apache.org (on) or 204.62.129.132 (off).
# The default is off because it'd be overall better for the net if people
# had to knowingly turn this feature on, since enabling it means that
# each client request will result in AT LEAST one lookup request to the
# nameserver.
#
HostnameLookups Off
#
# ErrorLog: The location of the error log file.
# If you do not specify an ErrorLog directive within a <VirtualHost>
# container, error messages relating to that virtual host will be
# logged here. If you *do* define an error logfile for a <VirtualHost>
# container, that host's errors will be logged there and not here.
#
ErrorLog /usr/local/apache/logs/error_log
#
# LogLevel: Control the number of messages logged to the error_log.
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
#
LogLevel warn
#
# The following directives define some format nicknames for use with
# a CustomLog directive (see below).
#
LogFormat "%h %l %u %t "%r" %>s %b "%{Referer}i" "%{User-Agent}i"" combined
LogFormat "%h %l %u %t "%r" %>s %b" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent
#
# The location and format of the access logfile (Common Logfile Format).
# If you do not define any access logfiles within a <VirtualHost>
# container, they will be logged here. Contrariwise, if you *do*
# define per-<VirtualHost> access logfiles, transactions will be
/Vir
#
# Enable/disable the handling of HTTP/1.1 "Via:" headers.
# ("Full" adds the server version; "Block" removes all outgoing Via: headers)
# Set to one of: Off | On | Full | Block
#
#ProxyVia On
#
# To enable the cache as well, edit and uncomment the following lines:
# (no cacheing without CacheRoot)
#
#CacheRoot "/usr/local/apache/proxy"
#CacheSize 5
#CacheGcInterval 4
#CacheMaxExpire 24
#CacheLastModifiedFactor 0.1
#CacheDefaultExpire 1
#NoCache a_domain.com another_domain.edu joes.garage_sale.com
#</IfModule>
# End of proxy directives.
### Section 3: Virtual Hosts
#
# VirtualHost: If you want to maintain multiple domains/hostnames on your
# machine you can setup VirtualHost containers for them.
# Please see the documentation at <URL:http://www.apache.org/docs/vhosts/>
# for further details before you try to setup virtual hosts.
# You may use the command line option '-S' to verify your virtual host
# configuration.
#
# If you want to use name-based virtual hosts you need to define at
# least one IP address (and port number) for them.
#
#가상 웹호스트 설정부분
NameVirtualHost 211.52.51.234
#NameVirtualHost 12.34.56.78
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
#
<VirtualHost 211.52.51.234>
ServerName leenux.hankooklinux.com
ServerAdmin leenux at hankooklinux.com DocumentRoot /home/leenux/wwwhome
ErrorLog logs/leenux.hankooklinux.com-error_log
CustomLog logs/leenux.hankooklinux.com-access_log common
</VirtualHost>
<VirtualHost 211.52.51.234>
ServerName gipcs74.aaa.com
ServerAdmin gipcs74 at unixcenter.net DocumentRoot /home/gipcs74/wwwhome
ErrorLog logs/gipcs74.aaa.com-error_log
CustomLog logs/gipcs74.aaa.com-access_log common
</VirtualHost>
<VirtualHost 211.52.51.234>
ServerName aaa.com
ServerAdmin webmaster at aaa.com ServerAlias *.aaa.com
DocumentRoot /home/aaa/wwwhome
UserDir public_home
ErrorLog logs/www.aaa.com-error_log
CustomLog logs/www.aaa.com-access_log common
</VirtualHost>