tomcat6 http 能正常访问 https 报404错误-问答-阿里云开发者社区-阿里云

开发者社区> 问答> 正文
阿里云
为了无法计算的价值
打开APP
阿里云APP内打开

tomcat6 http 能正常访问 https 报404错误

2016-06-03 00:12:32 6056 1

同url http能正常访问 https不能访问 报404错误
如:http://localhost/index.index 正常 https://localhost/index.html 为404
服务器环境:inux ,tomcat 6.0.36, jdk 1.6.0_37 64-Bit
本机模拟配置一切正常。推断可能服务器环境存在问题,求大神指出
server.xml

<?xml version='1.0' encoding='utf-8'?>
<!--APR library loader. Documentation at /docs/apr.html -->

<!--Initialize Jasper prior to webapps are loaded. Documentation at /docs/jasper-howto.html -->

<!-- Prevent memory leaks due to use of particular java/javax APIs-->

<!-- JMX Support for the Tomcat server. Documentation at /docs/non-existent.html -->

<!-- Global JNDI resources
Documentation at /docs/jndi-resources-howto.html
-->

<!-- Editable user database that can also be used by
UserDatabaseRealm to authenticate users
-->
type="org.apache.catalina.UserDatabase"
description="User database that can be updated and saved"
factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
pathname="conf/tomcat-users.xml" />
<!-- A "Service" is a collection of one or more "Connectors" that share
a single "Container" Note: A "Service" is not itself a "Container", 
so you may not define subcomponents such as "Valves" at this level.
Documentation at /docs/config/service.html
-->
<!--The connectors can use a shared executor, you can define one or more named thread pools-->
<!--
<Executor name="tomcatThreadPool" namePrefix="catalina-exec-" 
    maxThreads="150" minSpareThreads="4"/>
-->


<!-- A "Connector" represents an endpoint by which requests are received
     and responses are returned. Documentation at :
     Java HTTP Connector: /docs/config/http.html (blocking & non-blocking)
     Java AJP  Connector: /docs/config/ajp.html
     APR (HTTP/AJP) Connector: /docs/apr.html
     Define a non-SSL HTTP/1.1 Connector on port 8080
-->
<Connector port="80" protocol="HTTP/1.1" 
           connectionTimeout="20000" 
           redirectPort="8443" />
<Connector port="443" protocol="org.apache.coyote.http11.Http11Protocol" SSLEnabled="true" maxThreads="150" scheme="https"
secure="true" clientAuth="false" sslProtocol="TLS" keystoreFile="/home/cer/shcmctstore.jks" 
keystorePass="12345678" truststoreFile="/home/cer/shcmctkeystore.jks" truststorePass="12345678" />
<!-- A "Connector" using the shared thread pool-->
<!--
<Connector executor="tomcatThreadPool"
           port="80" protocol="HTTP/1.1" 
           connectionTimeout="20000" 
           redirectPort="8443" />
-->           
<!-- Define a SSL HTTP/1.1 Connector on port 8443
     This connector uses the JSSE configuration, when using APR, the 
     connector should be using the OpenSSL style configuration
     described in the APR documentation -->
<!--
<Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true"
           maxThreads="150" scheme="https" secure="true"
           clientAuth="false" sslProtocol="TLS" />
-->

<!-- Define an AJP 1.3 Connector on port 8009 -->
<!-- <Connector port="8009" protocol="AJP/1.3" redirectPort="8443" />-->


<!-- An Engine represents the entry point (within Catalina) that processes
     every request.  The Engine implementation for Tomcat stand alone
     analyzes the HTTP headers included with the request, and passes them
     on to the appropriate Host (virtual host).
     Documentation at /docs/config/engine.html -->

<!-- You should set jvmRoute to support load-balancing via AJP ie :
<Engine name="Catalina" defaultHost="localhost" jvmRoute="jvm1">         
--> 
<Engine name="Catalina" defaultHost="localhost">

  <!--For clustering, please take a look at documentation at:
      /docs/cluster-howto.html  (simple how to)
      /docs/config/cluster.html (reference documentation) -->
  <!--
  <Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster"/>
  -->        

  <!-- The request dumper valve dumps useful debugging information about
       the request and response data received and sent by Tomcat.
       Documentation at: /docs/config/valve.html -->
  <!--
  <Valve className="org.apache.catalina.valves.RequestDumperValve"/>
  -->

  <!-- This Realm uses the UserDatabase configured in the global JNDI
       resources under the key "UserDatabase".  Any edits
       that are performed against this UserDatabase are immediately
       available for use by the Realm.  -->
  <Realm className="org.apache.catalina.realm.UserDatabaseRealm"
         resourceName="UserDatabase"/>

  <!-- Define the default virtual host
       Note: XML Schema validation will not work with Xerces 2.2.
   -->
  <Host name="localhost"  appBase="webapps"
        unpackWARs="true" autoDeploy="true"
        xmlValidation="false" xmlNamespaceAware="false">

    <!-- 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 -->
    <!--
    <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"  
           prefix="localhost_access_log." suffix=".txt" pattern="common" resolveHosts="false"/>
    -->

  </Host>
</Engine>


connectionTimeout="20000" 
redirectPort="8443" />

resourceName="UserDatabase"/>
unpackWARs="true" autoDeploy="true"
xmlValidation="false" xmlNamespaceAware="false">



tomcat启动log
Aug 14, 2014 10:34:43 AM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /usr/java/jdk1.6.0_37/jre/lib/amd64/server:/usr/java/jdk1.6.0_37/jre/lib/amd64:/usr/java/jdk1.6.0_37/jre/../lib/amd64:/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib
Aug 14, 2014 10:34:43 AM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-80
Aug 14, 2014 10:34:43 AM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-443
Aug 14, 2014 10:34:43 AM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-12345
Aug 14, 2014 10:34:43 AM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 591 ms
Aug 14, 2014 10:34:43 AM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Aug 14, 2014 10:34:43 AM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.36
Aug 14, 2014 10:34:43 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory ROOT
INFO [main] 10:34:44,364 (ContextLoader.java:189): -Root WebApplicationContext: initialization started
INFO [main] 10:34:44,391 (AbstractApplicationContext.java:411): -Refreshing org.springframework.web.context.support.XmlWebApplicationContext@7c33788d: display name [Root WebApplicationContext]; startup date [Thu Aug 14 10:34:44 CST 2014]; root of context hierarchy
INFO [main] 10:34:44,443 (XmlBeanDefinitionReader.java:323): -Loading XML bean definitions from class path resource [applicationContext.xml]
INFO [main] 10:34:44,627 (AbstractApplicationContext.java:426): -Bean factory for application context [org.springframework.web.context.support.XmlWebApplicationContext@7c33788d]: org.springframework.beans.factory.support.DefaultListableBeanFactory@79024994
INFO [main] 10:34:44,700 (DefaultListableBeanFactory.java:414): -Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@79024994: defining beans [org.springframework.context.annotation.CommonAnnotationBeanPostProcessor#0,dataSource,transactionManager,sqlMapClient,sqlMapClientTemplate,baseService,infoDao,infoService,index,companyNews,phoneNumber,services,businessNews,partyNews,aboutCompany,pictureNews,businessHire,troubleshooting,companyCer,managementCer,honor,GMWord,orgChart,performance,notice,employeeNews,managerDao,managerService,manager,fileUpload,viewContent,appsOfComp]; root of factory hierarchy
INFO [main] 10:34:44,894 (ContextLoader.java:209): -Root WebApplicationContext: initialization completed in 528 ms
INFO [main] 10:34:44,996 (CommonsLogger.java:31): -Parsing configuration file [struts-default.xml]
INFO [main] 10:34:50,728 (CommonsLogger.java:31): -Parsing configuration file [struts-plugin.xml]
INFO [main] 10:34:50,741 (CommonsLogger.java:31): -Parsing configuration file [struts.xml]
INFO [main] 10:34:50,797 (CommonsLogger.java:31): -Initializing Struts-Spring integration...
INFO [main] 10:34:50,797 (CommonsLogger.java:31): -Setting autowire strategy to name
INFO [main] 10:34:50,798 (CommonsLogger.java:31): -... initialized Struts-Spring integration successfully
Aug 14, 2014 10:34:51 AM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-80
Aug 14, 2014 10:34:51 AM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-443
Aug 14, 2014 10:34:51 AM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina1
Aug 14, 2014 10:34:51 AM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.36
Aug 14, 2014 10:34:51 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory ota
Aug 14, 2014 10:34:51 AM org.apache.catalina.core.ApplicationContext log
INFO: Set web app root system property: 'webapp.root' = [/usr/apache-tomcat-6.0.36/webapps1/ota/]
Aug 14, 2014 10:34:51 AM org.apache.catalina.core.ApplicationContext log
INFO: Initializing log4j from [classpath:log4j.properties]
Aug 14, 2014 10:34:51 AM org.apache.catalina.core.ApplicationContext log
INFO: Initializing Spring root WebApplicationContext
Aug 14, 2014 10:34:54 AM org.apache.catalina.core.ApplicationContext log
INFO: Initializing Spring FrameworkServlet 'dispatcher'
Aug 14, 2014 10:34:55 AM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-12345
Aug 14, 2014 10:34:55 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 11514 ms
取消 提交回答
全部回答(1)
  • 西秦说云
    2019-07-17 19:25:42

    您好。您可以创建一个index.html放在网站根目录下进行测试

    0 0
相关问答

1

回答

HTTP 用于从 web 服务器向 web 客户端(浏览器)发送请求说法正确吗?

2021-12-02 17:43:53 261浏览量 回答数 1

1

回答

HTTP 请求方法有那些?

2021-12-02 20:08:24 85浏览量 回答数 1

1

回答

HTTP 请求方法的GET怎么描述?

2021-12-02 20:15:15 80浏览量 回答数 1

1

回答

HTTP 请求方法的HEAD是什么意思?

2021-12-02 20:16:19 106浏览量 回答数 1

1

回答

HTTP 请求方法的POST有什么用?

2021-12-02 20:17:27 121浏览量 回答数 1

0

回答

java模拟http请求 新版api 新增待办事项 报鉴权失败 Signature.AuthFail

2021-11-30 14:57:35 272浏览量 回答数 0

1

回答

HTTP请求每次连接只处理一个请求吗?

2021-11-22 21:48:47 269浏览量 回答数 1

1

回答

HTTP请求到服务器的请求消息包括哪几个部分?

2021-11-22 22:06:35 280浏览量 回答数 1

1

回答

在jQuery中用于发送异步HTTP请求的是什么?

2021-11-22 22:08:48 510浏览量 回答数 1

1

回答

http的请求的基本方法是什么?

2021-11-17 17:29:39 219浏览量 回答数 1
+关注
云栖技术
社区爱好者,专为云栖社区服务!
34
文章
897
问答
问答排行榜
最热
最新
相关电子书
更多
低代码开发师(初级)实战教程
立即下载
阿里巴巴DevOps 最佳实践手册
立即下载
冬季实战营第三期:MySQL数据库进阶实战
立即下载