首页 > 其他分享 >tomcat 免费的 .pem 证书 配置https

tomcat 免费的 .pem 证书 配置https

时间:2023-10-11 17:46:49浏览次数:31  
标签:tomcat 证书 pem certonly https certbot

获取证书网址:

https://certbot.eff.org/

下载并安装 https://github.com/certbot/certbot/releases/latest/download/certbot-beta-installer-win_amd64_signed.exe

如果服务器使用中,不想关闭执行:

certbot certonly --webroot

如果可以关闭执行:

certbot certonly --standalone

按照提示输入域名、邮箱即可

生成证书文件位置:

 配置tomcat下的server.xml添加以下代码:

<Connector port="443" SSLEnabled="true" secure="true" scheme="https">
  <SSLHostConfig>
    <Certificate certificateFile="C:\Certbot\live\11ps.com\cert.pem"
                 certificateKeyFile="C:\Certbot\live\11ps.com\privkey.pem"
                 certificateChainFile="C:\Certbot\live\11ps.com\chain.pem" />
  </SSLHostConfig>
</Connector>

 

标签:tomcat,证书,pem,certonly,https,certbot
From: https://www.cnblogs.com/laremehpe/p/17757782.html

相关文章

  • springMVC @Test方法中如何请求https
    原文链接:https://www.longkui.site/error/springmvc-test-https/4823/0.背景springMVC环境,需要在@Test方法中发送一个https请求,按照格式要求发送了,结果报错org.springframework.web.client.ResourceAccessException:I/OerroronPOSTrequestfor"https://xxxx/xxx/xx:jav......
  • java.lang.IllegalArgumentException: Expected MultipartHttpServletRequest: is a M
    原文链接:https://www.longkui.site/error/java-lang-illegalargumentexception-expected-multiparthttpservletrequest-is-a-multipartresolver-configured/4837/0.背景JAVA后台一个上传excel的接口,如下:importData(@RequestParam("file")MultipartFilefile)然后,前台按......
  • HTTP和HTTPS区别
    HTTP(HyperTextTransferProtocol)和HTTPS(HTTPSecure)都是用于在计算机之间传输数据的协议.但是,HTTPS在传输数据时使用了安全套接层(SSL)或者传输层安全(TLS)协议来加密数据,以防止第三方拦截或窃取数据。主要区别如下:1.安全性:HTTPS在传输过程中使用了加密技术,而HTTP......
  • 【Https异常】This request has been blocked; the content must be served over HTTP
    参考:https://www.cnblogs.com/756623607-zhang/p/11790283.html一、问题出现场景项目从http升级到https后,jsp页面存在发送http请求的情况下就会出现该异常。因为HTTPS是HTTPoverSecureSocketLayer,以安全为目标的HTTP通道,所以在HTTPS承载的页面上不允许出现http请求......
  • Unity使用https请求握手失败的处理方案
    Unity使用https请求握手失败的处理方案HandshakefailedUNITYTLS_INTERNALS解决方案varhandler=newHttpClientHandler();//需要加这句handler.ClientCertificateOptions=ClientCertificateOption.Manual;//需要加这句using(HttpCli......
  • tomcat部署多个站点
    只要在tomcat的server.xml中增加一个service节点,新建一个webapps2文件夹,把新站点的文件放到这个文件中的ROOT目录下即可<Servicename="Catalina"><Connectorport="8088"protocol="HTTP/1.1"connectionTimeout="20000"......
  • tomcat session cluster的实现
    #1.环境准备 IP主机名服务 10.0.0.150proxy.tan.comhttpd 10.0.0.160tomcat1.tan.comJDK8、tomcat8 10.0.0.170tomcat2.tan.comJDK8、tomcat8#2.在proxy主机配置httpd实现后端tomcat主机轮询[root@proxy~]#vim/etc/http......
  • 编写脚本实现tomcat一键安装8.5版本
    #下载包到/root目录[root@tomcat~]#lljdk-8u212-linux-x64.tar.gzapache-tomcat-8.5.82.tar.gz-rw-r--r--1rootroot10610025Aug2717:14apache-tomcat-8.5.82.tar.gz-rw-r--r--1rootroot195013152Aug2717:08jdk-8u212-linux-x64.tar.gz#编写脚本[root@to......
  • c# 最终 https的
          可获取公司https的 publicstaticvoidtest2(Stringurl){           WebClientwc=newWebClient();           wc.Encoding=Encoding.UTF8;           wc.Headers.Add("Accept:text/html,application/xhtml+xml,app......
  • nginx实现后端tomcat的负载均衡调度
    1.负载均衡主机和网络地址规划10.0.0.152proxy.magedu.orgnginx10.0.0.150t1.magedu.orgtomcat110.0.0.160t2.magedu.orgtomcat2#只需在10.0.0.52的nginx主机上实现域名解析[root@localhost~]#cat/etc/hosts127.0.0.1localhost......