1

これは私のhostsファイルです ( c:\WINDOWS\system32\drivers\etc )

# Copyright (c) 1993-1999 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
#      102.54.94.97     rhino.acme.com          # source server
#       38.25.63.10     x.acme.com              # x client host

127.0.0.1       localhost

x.x.x.x     my.hostname1
#x.x.x.x        my.hostname2

xxxx は私の実際の IP です。Windows XP で 127.0.0.1:80 で Tomcat 6.0 サーバーを実行しています (私のマシンではなく、私を責めないでください)。そのため、localhost または xxxx を開くと、Tomcat のエラー メッセージが表示されます (ただし、URL にプロジェクト名を入力していないため、問題ありません)。

my.hostname1 を開くと、ネットワーク エラー ページが表示されます。hostsファイル内のmy.hostname1my-hostname1に置き換えると、動作は localhost や xxxx と同じになるため、問題はホスト名のドット (.) 文字だと思います。ホスト名にドットを含める方法はありますか?

ありがとうございました

編集:cmdで実行した出力ping my.hostname1

Pinging my.hostname1[x.x.x.x] with 32 bytes of data:



Reply from x.x.x.x: bytes=32 time<1ms TTL=128

Reply from x.x.x.x: bytes=32 time<1ms TTL=128

Reply from x.x.x.x: bytes=32 time<1ms TTL=128

Reply from x.x.x.x: bytes=32 time<1ms TTL=128



Ping statistics for x.x.x.x:

    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),

Approximate round trip times in milli-seconds:

   Minimum = 0ms, Maximum = 0ms, Average = 0ms
4

2 に答える 2

4

プロキシの問題であることがわかりました。今では、インターネット オプションに例外を追加しました。正確には 'local*' で、すべてが機能します。

于 2013-10-31T09:57:23.173 に答える