私が自宅サーバを公開する主目的でもある、Webサーバを構築しました。また、ついでにPHPも入れてしまいました。
インストールはyumコマンドで簡単にできます。
[root@sv01 ~]# yum -y install httpd
[root@sv01 ~]# yum -y install php
Apacheの設定ファイル /etc/httpd/conf/httpd.conf を編集します。
ServerTokens OS
ServerTokens Prod
ServerAdmin root@localhost
ServerAdmin webmaster@wk64.com
Options Indexes FollowSymLinks
Options Includes ExecCGI FollowSymLinks
AllowOverride None
AllowOverride All
DirectoryIndex index.html index.html.var
DirectoryIndex index.shtml index.html index.html.var
ServerSignature On
ServerSignature Off
AddDefaultCharset UTF-8
AddDefaultCharset Off
#AddHandler cgi-script .cgi
AddHandler cgi-script .cgi .pl
Apacheの起動
[root@sv01 ~]# /etc/rc.d/init.d/httpd start
自動起動の設定
[root@sv01 ~]# chkconfig --level 35 httpd on
|