[ ホーム | 一覧 | 検索 | 最終更新 | ヘルプ ] [ 新規 ]

KAWANO's PukiWiki Plus! - Install Log/CentOS6/httpd のバックアップ(No.1)

AND OR
  • バックアップ一覧
  • 差分 を表示
  • 現在との差分 を表示
  • 現在との差分 - Visual を表示
  • ソース を表示
  • Install Log/CentOS6/httpd へ行く。
    • 1 (2014-03-20 (木) 14:24:10)
    • 2 (2014-03-20 (木) 17:11:43)

Apacheの設定

▲ ▼

Apacheのインストール

ここまでの段階で、Apache(httpd)本体はインストール済みになっているはず。 もし起動している場合は、一度停止しておく。

# service httpd status ←起動しているかを確認
# service httpd stop ←httpdサーバの停止

念のため、開発ツール関係をインストールしておく。

# yum install httpd-devel apr-devel apr-util-devel
▲ ▼

Apacheの設定

設定ファイルを編集する。

# vi /etc/httpd/conf/httpd.conf

次の箇所を変更する。

ServerTokens Prod ←エラー時にOS名を表示しないようにする
...
KeepAlive On
...
ServerAdmin webmaster@hogehoge.hoge.ac.jp ←エラー時に表示される管理者宛メールアドレス
...
ServerName hogehoge.hoge.ac.jp:80 ←サーバの名前
...
<Directory "/var/www/html">
...
    Options Includes ExecCGI FollowSymLinks ←CGIとSSIが使えるようにする
...
    AllowOverride All ←.htaccessを許可
...
</Directory>
...
UserDir public_html ←ユーザが~/public_html以下で公開できるようにする
...
<Directory /home/*/public_html>
...
    AllowOverride All ←.htaccessを許可
...
    Options Includes ExecCGI FollowSymLinks ←CGIとSSIが使えるようにする
...
</Directory>
...
ServerSignature Off ← エラーページでApacheのバージョンを表示しないようにする
...
#AddDefaultCharset UTF-8 ← コメントアウト
...
AddHandler cgi-script .cgi .pl ← CGIスクリプトに.plを追加

設定できたら、設定ファイルの文法をチェックする。

# apachectl configtest

あと、余計なページを削除する。

# rm -f /etc/httpd/conf.d/welcome.conf
# rm -f /var/www/error/noindex.html

また、CGI用に perl にシンボリックリンクを用意する。

# ln -s /usr/bin/perl /usr/local/bin/perl
▲ ▼

サービスの起動

サービスを起動する。

# chkconfig httpd on
# service httpd start

メニュー

  • トップ
  • 授業
  • PukiWiki Log
  • Install Log
  • 道具箱
  • セキュリティ情報
  • RSSアンテナ

大学関係リンク

  • Webメール
  • 健康システム学科
  • 情報メディアセンター
  • 兵庫大学

今日の5件
  • FrontPage(33)
  • Lecture/CompPracC32005/10th(1)
  • Lecture/CompPracC2005/8th/example(1)
  • Lecture/CompPracR2004/11th(1)
  • Lecture/CompPracC2006/11th(1)
最新の5件
2016-04-08
  • Lecture/timetable_2016
  • Lecture
  • FrontPage
2015-09-30
  • Lecture/timetable_2015
2015-04-04
  • MenuBar

total: 1828
today: 1
yesterday: 0
now: 12


リロード   差分   ホーム 一覧 検索 最終更新 バックアップ リンク元   ヘルプ   最終更新のRSS
http%3A%2F%2Fhs-www.hyogo-dai.ac.jp%2F~kawano%2F%3FInstall%252520Log%25252FCentOS6%25252Fhttpd
Founded by Minoru Kawano.
Powered by PukiWiki Plus! 1.4.7plus-u2-i18n. HTML convert time to 3.746 sec.
Valid XHTML 1.1