0

Web サイトを備えた Web サーバーがあり、本番前に使用する別のアドレスを追加したいと考えています。

ここに存在する:

httpd.conf:

ServerAdmin support@toto.com
ServerName www.toto.com:80
DocumentRoot "/home/tutu/var/www/html"

モジュール/vhost.conf:

<VirtualHost *:80>
    ServerAdmin support@toto.com
    ServerName www.toto.com:80
    DirectoryIndex index.php

    ErrorLog /home/tutu/var/log/httpd/error-mod_log
    LogLevel warn
    CustomLog /home/tutu/var/log/httpd/access-mod_log common-cookie

   <Location /server-status>
    SetHandler server-status
    Order deny,allow
    Deny from all
    Allow from 127.0.0.1
  </Location>
</VirtualHost>

別の VirtualHost を追加しようとしましたが、新しいアドレスが機能しません:

<VirtualHost *:80>
    ServerAdmin support@toto.com
    ServerName www2.toto.com:80
    DirectoryIndex index.php

    ErrorLog /home/tutu/var/log/httpd/error-www2_log
    LogLevel warn
    CustomLog /home/tutu/var/log/httpd/access-www2_log common-cookie
    DocumentRoot "/home/tutu/var/www2/html"
</VirtualHost>

アドレス www2.toto.com が機能していません。アイデアはありますか?

ありがとう

4

1 に答える 1

3

www2.toto.com を DNS に追加しましたか? パブリック DNS にはまだ追加されていません。(ただし、www.toto.com は)

「機能していません」はあまり具体的ではありません。そのサイトのデフォルトの Apache Web ページを取得しますか、それともサーバーに到達しませんか? 後者の場合、Apache の設定ではなく、DNS ルックアップが実際の問題である可能性があります。

Apache-config は問題ないように見えますが、エイリアス ポートとして :80 を指定する必要はありません。

于 2012-11-27T11:38:02.573 に答える