|
|
| ・Apache (web server) httpd.conf 設定 |
[fedora@fedoracore4 ~]$ su -
[root@fedoracore4 ~]# vi /etc/httpd/conf/httpd.conf |
#
# Based upon the NCSA server configuration files originally by Rob McCool.
#
# This is the main Apache server configuration file. It contains the
# configuration directives that give the server its instructions.
# See <URL:http://httpd.apache.org/docs-2.0/> for detailed information about
# the directives.
httpd.conf の内容が表示されたらそのまま /ServerAdmin と入力して下さい。(ServerAdminを検索)
|
# ServerAdmin: Your address, where problems with the server should be
# e-mailed. This address appears on some server-generated pages, such
# as error documents. e.g. admin@your-domain.com
#
#ServerAdmin root@localhost #でコメントアウト
ServerAdmin webmaster@fedoracore4.com サーバー管理者のメールアドレス
#
# ServerName gives the name and port that the server uses to identify itself.
# This can often be determined automatically, but we recommend you specify
# it explicitly to prevent problems during startup.
#
# If this is not set to valid DNS name for your host, server-generated
# redirections will not work. See also the UseCanonicalName directive.
#
# If your host doesn't have a registered DNS name, enter its IP address here.
# You will have to access it by its address anyway, and this will make
# redirections work in a sensible way.
#
#ServerName www.example.com:80
ServerName fedoracore4.com:80 サーバーの名前とポート
2箇所を編集し終わればコマンドモードに戻り、再び検索します。 /Options
Indexes
# The Options directive is both complicated and important. Please see
# http://httpd.apache.org/docs-2.0/mod/core.html#options
# for more information.
#
#Options Indexes FollowSymLinks #でコメントアウト
Options Includes ExecCGI FollowSymLinks CGI / SSI を許可
#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# Options FileInfo AuthConfig Limit
#
#AllowOverride None #でコメントアウト
AllowOverride All .htaccess を許可
#
# Controls who can get stuff from this server.
#
2箇所を編集し終わればコマンドモードに戻り、再び検索します。 /AddDefaultCharset
# Specify a default charset for all content served; this enables
# interpretation of all content as UTF-8 by default. To use the
# default browser choice (ISO-8859-1), or to allow the META tags
# in HTML content to override this choice, comment out this
# directive:
#
#AddDefaultCharset UTF-8 #でコメントアウト
AddDefaultCharset EUC-JP Websiteで使用する文字コードを指定 (ここではEUC)
#
# AddType allows you to add to or override the MIME configuration
# file mime.types for specific file types.
#
#AddType application/x-tar .tgz
:wq で保存して終了 |
| ・Apache (web server) 起動設定 |
[root@fedoracore4 ~]# /etc/init.d/httpd start apache起動
httpd を起動中: [ OK ]
[root@fedoracore4 ~]#
|
確認
 |
ブラウザを立ち上げて、http://192.168.1.1/へアクセス
左のようなテスト画面が見えればOK。 |
[root@fedoracore4 ~]# cat chkcofig_def.txt |grep httpd apacheの起動設定確認
httpd 0:off 1:off 2:off 3:off 4:off 5:off 6:off 初期値では自動起動しない
[root@fedoracore4 ~]# chkconfig httpd on apacheの起動設定
[root@fedoracore4 ~]# chkconfig --list httpd apacheの起動設定確認
httpd 0:off 1:off 2:on 3:on 4:on 5:on 6:off
[root@fedoracore4 ~]# |
BIND設定へ
|