ARC FAQ Document Database -
ExtApache
はすでに存在します。
Working/Viewing :
[
トップ
|
リロード
] [
一覧
|
単語検索
|
最終更新
|
ヘルプ
] [
リンク元
]
開始行:
**httpd.confの追加設定−バーチャルホスト多ドメイン向き
以下の設定では、Hostingサーバ向きの設定であって、IPベース...
Hostingによるhttpd.confのチューンです。
以下以外はApacheのインストールのデフォルトのままで、以下...
変更します。
→デフォルトでは以下のユーザとグループで動作させます。
User www
Group www
→エラーログのカスタム場所指定
ErrorLog /home/httpd-default/logs/error_log
→AWSTATSの利用の場合はログ形式はcombinedにすること
CustomLog /home/httpd-default/logs/access_log combined
→ハッカー防止のためサーバのヘッダー情報を隠すこと、バー...
ServerSignature Off
→ここではデフォールトページのパスになります。
<Directory "/home/httpd-default/html">
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>
→バーチャルホストの設定
NameVirtualHost 192.168.240.8:80
→SSL用のバーチャルホストの設定
<IfDefine SSL>
NameVirtualHost 192.168.240.8:443
</IfDefine>
→管理しやすいように、各バーチャルホストをsites/の下に設...
それぞれのドメイン名で設定ファイル名になります。以下は...
Include /usr/local/apache/conf/sites/host4.xxx.ne.jp
Include /usr/local/apache/conf/sites/www.xxx.ne.jp
Include /usr/local/apache/conf/sites/www.abc.or.jp
また各バーチャルホストの設定は以下のsites/の下にある。80...
-''80番ポートのバーチャルホストの設定例''
<VirtualHost 192.168.240.8:80>
ServerAdmin admin@xxx.ne.jp
DocumentRoot /home/sites/www.xxx.ne.jp/www
User xxx
Group xxx
ServerAlias rxxx.ne.jp
Alias /awicon/ /home/httpd-default/html/awicon/
ServerName www.xxx.ne.jp
ScriptAlias /cgi-bin/ /home/sites/www.xxx.ne.jp/cgi-bin/
CustomLog /home/sites/www.xxx.ne.jp/logs/access_log comb...
</VirtualHost>
-''443番ポートのバーチャルホストの設定例''
<IfDefine SSL>
<VirtualHost 192.168.240.8:443>
ServerAdmin admin@xxx.ne.jp
DocumentRoot /home/sites/www.xxx.ne.jp/www
User xxx
Group xxx
SSLEngine on
→ここでは各バーチャルホストにさらにフォルダなど分けると...
SSLCertificateFile /usr/local/apache/conf/ssl.crt/server...
SSLCertificateKeyFile /usr/local/apache/conf/ssl.key/ser...
ServerAlias rxxx.ne.jp
Alias /awicon/ /home/httpd-default/html/awicon/
ServerName www.xxx.ne.jp
ScriptAlias /cgi-bin/ /home/sites/www.xxx.ne.jp/cgi-bin/
CustomLog /home/sites/www.xxx.ne.jp/logs/access_log comb...
</VirtualHost>
</IfDefine>
また同じドメイン名でHTTPとHTTPS同時に動作させる場合は上記...
二つともまとめて一つの設定ファイルに記述します。このよう...
バーチャルドメインの管理が便利になります。
-''スタートアップスクリプトの作成と追加''
スタートアップスクリプトは以下のようになります。これは例...
改造してご利用ください。
##!/bin/sh
##
## Startup script for the Apache Web Server
##
## chkconfig: 345 85 15
## description: Apache is a World Wide Web server. It i...
## HTML files and CGI.
## processname: apache
## pidfile: /var/run/apache.pid
## config: /usr/local/apache/conf/access.conf
## config: /usr/local/apache/conf/httpd.conf
## config: /usr/local/apache/conf/srm.conf
## Source function library.
. /etc/rc.d/init.d/functions
## See how we were called.
case "$1" in
start)
echo -n "Starting httpd: "
/usr/local/apache/bin/apachectl startssl
echo
;;
stop)
echo -n "Shutting down http: "
/usr/local/apache/bin/apachectl stop
echo
;;
status)
status httpd
;;
restart)
/usr/local/apache/bin/apachectl restart
;;
*)
echo "Usage: $0 {start|stop|restart|status}"
exit 1
esac
exit 0
またスタートの時にSSLをご利用になればstartsslとしてくださ...
最後にサービスとして登録が必要で、ランレベルごとに有効に...
$ /sbin/chkconfig --add apache
$ /sbin/chkconfig --level 3 apache on
終了行:
**httpd.confの追加設定−バーチャルホスト多ドメイン向き
以下の設定では、Hostingサーバ向きの設定であって、IPベース...
Hostingによるhttpd.confのチューンです。
以下以外はApacheのインストールのデフォルトのままで、以下...
変更します。
→デフォルトでは以下のユーザとグループで動作させます。
User www
Group www
→エラーログのカスタム場所指定
ErrorLog /home/httpd-default/logs/error_log
→AWSTATSの利用の場合はログ形式はcombinedにすること
CustomLog /home/httpd-default/logs/access_log combined
→ハッカー防止のためサーバのヘッダー情報を隠すこと、バー...
ServerSignature Off
→ここではデフォールトページのパスになります。
<Directory "/home/httpd-default/html">
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>
→バーチャルホストの設定
NameVirtualHost 192.168.240.8:80
→SSL用のバーチャルホストの設定
<IfDefine SSL>
NameVirtualHost 192.168.240.8:443
</IfDefine>
→管理しやすいように、各バーチャルホストをsites/の下に設...
それぞれのドメイン名で設定ファイル名になります。以下は...
Include /usr/local/apache/conf/sites/host4.xxx.ne.jp
Include /usr/local/apache/conf/sites/www.xxx.ne.jp
Include /usr/local/apache/conf/sites/www.abc.or.jp
また各バーチャルホストの設定は以下のsites/の下にある。80...
-''80番ポートのバーチャルホストの設定例''
<VirtualHost 192.168.240.8:80>
ServerAdmin admin@xxx.ne.jp
DocumentRoot /home/sites/www.xxx.ne.jp/www
User xxx
Group xxx
ServerAlias rxxx.ne.jp
Alias /awicon/ /home/httpd-default/html/awicon/
ServerName www.xxx.ne.jp
ScriptAlias /cgi-bin/ /home/sites/www.xxx.ne.jp/cgi-bin/
CustomLog /home/sites/www.xxx.ne.jp/logs/access_log comb...
</VirtualHost>
-''443番ポートのバーチャルホストの設定例''
<IfDefine SSL>
<VirtualHost 192.168.240.8:443>
ServerAdmin admin@xxx.ne.jp
DocumentRoot /home/sites/www.xxx.ne.jp/www
User xxx
Group xxx
SSLEngine on
→ここでは各バーチャルホストにさらにフォルダなど分けると...
SSLCertificateFile /usr/local/apache/conf/ssl.crt/server...
SSLCertificateKeyFile /usr/local/apache/conf/ssl.key/ser...
ServerAlias rxxx.ne.jp
Alias /awicon/ /home/httpd-default/html/awicon/
ServerName www.xxx.ne.jp
ScriptAlias /cgi-bin/ /home/sites/www.xxx.ne.jp/cgi-bin/
CustomLog /home/sites/www.xxx.ne.jp/logs/access_log comb...
</VirtualHost>
</IfDefine>
また同じドメイン名でHTTPとHTTPS同時に動作させる場合は上記...
二つともまとめて一つの設定ファイルに記述します。このよう...
バーチャルドメインの管理が便利になります。
-''スタートアップスクリプトの作成と追加''
スタートアップスクリプトは以下のようになります。これは例...
改造してご利用ください。
##!/bin/sh
##
## Startup script for the Apache Web Server
##
## chkconfig: 345 85 15
## description: Apache is a World Wide Web server. It i...
## HTML files and CGI.
## processname: apache
## pidfile: /var/run/apache.pid
## config: /usr/local/apache/conf/access.conf
## config: /usr/local/apache/conf/httpd.conf
## config: /usr/local/apache/conf/srm.conf
## Source function library.
. /etc/rc.d/init.d/functions
## See how we were called.
case "$1" in
start)
echo -n "Starting httpd: "
/usr/local/apache/bin/apachectl startssl
echo
;;
stop)
echo -n "Shutting down http: "
/usr/local/apache/bin/apachectl stop
echo
;;
status)
status httpd
;;
restart)
/usr/local/apache/bin/apachectl restart
;;
*)
echo "Usage: $0 {start|stop|restart|status}"
exit 1
esac
exit 0
またスタートの時にSSLをご利用になればstartsslとしてくださ...
最後にサービスとして登録が必要で、ランレベルごとに有効に...
$ /sbin/chkconfig --add apache
$ /sbin/chkconfig --level 3 apache on
ページ名:
既存のページ名で編集する