主题 : 服务器
级别: 解元
UID: 66933
积分:388 加为好友
威望: 29 精华: 0
主题:56 回复:147
注册时间:2014-09-11
在线时长:0
11#   发表于:2014-10-22 16:35:11  IP:218.117.*.*
回复第10楼
 <Context path="" docBase="C:\Program Files\Apache Software Foundation\Tomcat 7.0\webapps\jcnww.war" debug="0" reloadable="true" />

就是写到把自己要用的域名的写到path是吗?
级别: 状元
UID: 33380
积分:50625 加为好友
威望: 21 精华: 3
主题:88 回复:30687
注册时间:2012-05-07
在线时长:0
12#   发表于:2014-10-22 16:37:50  IP:115.214.*.*
到你系统的盘的host里改
功成由勤,业精于勤。
级别: 解元
UID: 66933
积分:388 加为好友
威望: 29 精华: 0
主题:56 回复:147
注册时间:2014-09-11
在线时长:0
13#   发表于:2014-10-22 16:49:06  IP:218.117.*.*
回复第10楼

hosts中的配置
# Copyright (c) 1993-2009 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

# localhost name resolution is handled within DNS itself.
# 127.0.0.1     www.demo.com
# ::1            localhost


server.xml中的配置
  <Host name="www.sxdi.gov.cn"  appBase="webapps"
            unpackWARs="true" autoDeploy="true">

        <!-- SingleSignOn valve, share authentication between web applications
             Documentation at: /docs/config/valve.html -->
        <!--
        <Valve className="org.apache.catalina.authenticator.SingleSignOn" />
        -->

        <!-- Access log processes all example.
             Documentation at: /docs/config/valve.html
             Note: The pattern used is equivalent to using pattern="common" 
        <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
               prefix="localhost_access_log." suffix=".txt"
               pattern="%h %l %u %t &quot;%r&quot; %s %b" />-->
      <Context path="www.demo.com" docBase="C:\Program Files\Apache Software Foundation\Tomcat 7.0\webapps\jcnww.war" debug="0" reloadable="true" />
      </Host>

端口也设置成80了,可是还是不行。请求上面的配置正确吗?
级别: 总版主
UID: 10736
积分:149787 加为好友
威望: 212 精华: 42
主题:297 回复:127674
注册时间:2010-09-08
在线时长:90.1
14#   发表于:2014-10-22 16:49:49  IP:115.214.*.*
不行你域名配置成127.0.0.1可以么?
路漫漫其修远兮,吾将上下而求索!
级别: 解元
UID: 66933
积分:388 加为好友
威望: 29 精华: 0
主题:56 回复:147
注册时间:2014-09-11
在线时长:0
15#   发表于:2014-10-22 16:59:16  IP:218.117.*.*
回复第10楼

在hosts中的配置
For example:
#
#      102.54.94.97     rhino.acme.com          # source server
#       38.25.63.10     x.acme.com              # x client host

# localhost name resolution is handled within DNS itself.
# 127.0.0.1     www.demo.com
# ::1            localhost

在server.xml中的配置

<Host name="localhost"  appBase="webapps"
            unpackWARs="true" autoDeploy="true">

        <!-- SingleSignOn valve, share authentication between web applications
             Documentation at: /docs/config/valve.html -->
        <!--
        <Valve className="org.apache.catalina.authenticator.SingleSignOn" />
        -->

        <!-- Access log processes all example.
             Documentation at: /docs/config/valve.html
             Note: The pattern used is equivalent to using pattern="common" 
        <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
               prefix="localhost_access_log." suffix=".txt"
               pattern="%h %l %u %t &quot;%r&quot; %s %b" />-->
      <Context path="www.demo.com" docBase="C:\Program Files\Apache Software Foundation\Tomcat 7.0\webapps\jcnww.war" debug="0" reloadable="true" />
      </Host>

端口以修改成80

可是还是不行,什么原因呢?
级别: 解元
UID: 66933
积分:388 加为好友
威望: 29 精华: 0
主题:56 回复:147
注册时间:2014-09-11
在线时长:0
16#   发表于:2014-10-22 16:59:31  IP:218.117.*.*
回复第10楼

在hosts中的配置
For example:
#
#      102.54.94.97     rhino.acme.com          # source server
#       38.25.63.10     x.acme.com              # x client host

# localhost name resolution is handled within DNS itself.
# 127.0.0.1     www.demo.com
# ::1            localhost

在server.xml中的配置

<Host name="localhost"  appBase="webapps"
            unpackWARs="true" autoDeploy="true">

        <!-- SingleSignOn valve, share authentication between web applications
             Documentation at: /docs/config/valve.html -->
        <!--
        <Valve className="org.apache.catalina.authenticator.SingleSignOn" />
        -->

        <!-- Access log processes all example.
             Documentation at: /docs/config/valve.html
             Note: The pattern used is equivalent to using pattern="common" 
        <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
               prefix="localhost_access_log." suffix=".txt"
               pattern="%h %l %u %t &quot;%r&quot; %s %b" />-->
      <Context path="www.demo.com" docBase="C:\Program Files\Apache Software Foundation\Tomcat 7.0\webapps\jcnww.war" debug="0" reloadable="true" />
      </Host>

端口以修改成80

可是还是不行,什么原因呢?
级别: 状元
UID: 33380
积分:50625 加为好友
威望: 21 精华: 3
主题:88 回复:30687
注册时间:2012-05-07
在线时长:0
17#   发表于:2014-10-22 17:02:16  IP:115.214.*.*
你里面加#的意思是注释那域名啊,注释了肯定访问不到
功成由勤,业精于勤。
|< < 1 2 共2页