$HTTP_PATH/conf.d/vhost.conf
Apache Webサーバーのメイン構成ファイルに含まれているvhost定義を挿入しました$HTTP_PATH/conf/httpd.conf
か?
php
との統合を確認しましたhttpd.conf
か?phpモジュールなどを読み込んでいます。
php.ini
アプリケーション.htaccess
とphp
要件に関してファイルを確認しましたか?
サーバー上の任意のホスト名でサイトにアクセスできない限り、エイリアスを作成することは本当に悪い方法です...しかし、それが検索エンジンのスコアを確実に下げることを忘れないでください。
/ var / log / httpd / error_logを差し引いて、詳細をお知らせください。
あなたはそれを得ることができますtail -f /path/to/error/log
追加:
httpdモジュールを見ることができますmod_log_config
。デフォルトのログ行は次のようにフォーマットされています。
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
次のように変更します。
LogFormat "%v %h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
%vは、ログ内に仮想ホストの名前を挿入します。これらの名前は、以下に示すパーサーによって表示およびフィルタリングされます。
そして、apache Webサーバーで配布されているスクリプトを使用して、virtualhostsで分離されたログファイルを取得します/src/support/split-logfile.pl
。
#!/usr/bin/perl
#
# ====================================================================
# Copyright (c) 1995-1998 The Apache Group. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in
# the documentation and/or other materials provided with the
# distribution.
#
# 3. All advertising materials mentioning features or use of this
# software must display the following acknowledgment:
# "This product includes software developed by the Apache Group
# for use in the Apache HTTP server project (http://www.apache.org/)."
#
# 4. The names "Apache Server" and "Apache Group" must not be used to
# endorse or promote products derived from this software without
# prior written permission. For permission please contact
# Apache@Apache.Org.
#
# 5. Products derived from this software may not be called "Apache"
# nor may "Apache" appear in their names without prior written
# permission of the Apache Group.
#
# 6. Redistributions of any form whatsoever must retain the following
# acknowledgment:
# "This product includes software developed by the Apache Group
# for use in the Apache HTTP server project (http://www.apache.org/)."
#
# THIS SOFTWARE IS PROVIDED BY THE APACHE GROUP ``AS IS'' AND ANY
# EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE APACHE GROUP OR
# ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
# OF THE POSSIBILITY OF SUCH DAMAGE.
# ====================================================================
#
# This software consists of voluntary contributions made by many
# individuals on behalf of the Apache Group and was originally based
# on public domain software written at the National Center for
# Supercomputing Applications, University of Illinois, Urbana-Champaign.
# For more information on the Apache Group and the Apache HTTP server
# project, please see <http://www.apache.org/>.
#
#
# This script will take a combined Web server access
# log file and break its contents into separate files.
# It assumes that the first field of each line is the
# virtual host identity (put there by "%v"), and that
# the logfiles should be named that+".log" in the current
# directory.
#
# The combined log file is read from stdin. Records read
# will be appended to any existing log files.
#
%is_open = ();
while ($log_line = <STDIN>) {
#
# Get the first token from the log record; it's the
# identity of the virtual host to which the record
# applies.
#
($vhost) = split (/\s/, $log_line);
#
# Normalize the virtual host name to all lowercase.
# If it's blank, the request was handled by the default
# server, so supply a default name. This shouldn't
# happen, but caution rocks.
#
$vhost = lc ($vhost) or "access";
#
# If the log file for this virtual host isn't opened
# yet, do it now.
#
if (! $is_open{$vhost}) {
open $vhost, ">>${vhost}.log"
or die ("Can't open ${vhost}.log");
$is_open{$vhost} = 1;
}
#
# Strip off the first token (which may be null in the
# case of the default server), and write the edited
# record to the current log file.
#
$log_line =~ s/^\S*\s+//;
printf $vhost "%s", $log_line;
}
exit 0;
そして、これらが十分でないかどうかを次のlogcronスクリプトで確認できます。これらの記事のテキストに従うことができます。