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

开发者社区> 云栖技术> 正文

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

2016-06-03 00:12:32 5427 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
相关问答

162

回答

惊喜翻倍:免费ECS+免费环境配置~!(ECS免费体验6个月活动3月31日结束)

豆妹 2014-10-29 17:52:21 223034浏览量 回答数 162

145

回答

【新手入门】云服务器linux使用手册

fanyue88888 2012-11-26 17:14:18 157105浏览量 回答数 145

8

回答

OceanBase 使用动画(持续更新)

mq4096 2019-02-20 17:16:36 333899浏览量 回答数 8

110

回答

OSS存储服务-客户端工具

newegg11 2012-05-17 15:37:18 292317浏览量 回答数 110

22

回答

爬虫数据管理【问答合集】

我是管理员 2018-08-10 16:37:41 146805浏览量 回答数 22

18

回答

阿里云开放端口权限

xcxx 2016-07-20 15:03:33 643196浏览量 回答数 18

31

回答

[@倚贤][¥20]刚学完html/css/js的新手学习servlet、jsp需要注意哪些问题?

弗洛伊德6 2018-10-27 21:52:43 145641浏览量 回答数 31

38

回答

安全组详解,新手必看教程

我的中国 2017-11-30 15:23:46 256890浏览量 回答数 38

249

回答

阿里云LNAMP(Linux + Nginx + Apache + MySQL + PHP)环境一键安装脚本

云代维 2014-02-14 15:26:06 302628浏览量 回答数 249

24

回答

【精品问答】python技术1000问(1)

问问小秘 2019-11-15 13:25:00 471495浏览量 回答数 24
+关注
云栖技术
社区爱好者,专为云栖社区服务!
33
文章
898
问答
推荐问答
相关电子书
更多
文娱运维技术
立即下载
《SaaS模式云原生数据仓库应用场景实践》
立即下载
《看见新力量:二》电子书
立即下载