开发者社区 问答 正文

类似 www.domain.com:8080/project的能上https吗?

公司的一个业务系统没有备案80端口,现在是使用其他端口的,由于项目发展需要,准备要上https,请教下有经验的前辈,这个可以有吗。

展开
收起
落地花开啦 2016-06-01 15:21:24 2253 分享 版权
2 条回答
写回答
取消 提交回答
  • 好好学习。天天向上

    可以有。但是您需要购买https证书


    这个证书。通过阿里的云市场。好像有卖的吧

    2019-07-17 19:23:24
    赞同 展开评论
  • 喜欢技术,喜欢努力的人

    可以, server.xml 配置就能行了

    ①.<Connector SSLEnabled="true" clientAuth="false" keystoreFile="C:\tool\apache-tomcat-6.0.35\tomcat.keystore" keystorePass="1a2s3d4f5g" maxThreads="150" port="443" protocol="HTTP/1.1" scheme="https" secure="true" sslProtocol="TLS"/>
    
    ②.<login-config>  
        <!-- Authorization setting for SSL -->  
        <auth-method>CLIENT-CERT</auth-method>  
        <realm-name>Client Cert Users-only Area</realm-name>  
        </login-config> 
        <security-constraint>  
            <!-- Authorization setting for SSL -->  
            <web-resource-collection >  
                <web-resource-name >SSL</web-resource-name>  
                <url-pattern>/order/*</url-pattern>  
            </web-resource-collection>  
            <user-data-constraint>  
                <transport-guarantee>CONFIDENTIAL</transport-guarantee>  
            </user-data-constraint>  
        </security-constraint>

    修改:1.Tomcat放一个EXE程序;

      2.修改server.xml 2处8443为443、1处上面①;
      3.web底下的web.xml最下面添加如上的②;
    2019-07-17 19:23:24
    赞同 展开评论
问答地址: