乌海网站建设,wordpress更改自定义文章页面,怎么查网站开发的语言,上海百度地图生成证书
这里使用自己生成的免费证书。在${JAVA_HOME}/bin 下可以看到keytool.exe,在改目录打开cmd然后输入#xff1a;
keytool -genkey -v -alias lgq.com -keyalg RSA -keystore d:/zj/ssl/fastfly.com.keystore -validity 3650生成证书过程中#xff1a;【你的名字】对…生成证书
这里使用自己生成的免费证书。在${JAVA_HOME}/bin 下可以看到keytool.exe,在改目录打开cmd然后输入
keytool -genkey -v -alias lgq.com -keyalg RSA -keystore d:/zj/ssl/fastfly.com.keystore -validity 3650生成证书过程中【你的名字】对应网站域名或IP。 转换证书
常用证书格式JKS(.keystore)微软(.pfx)OPSSL之PEM(.key .crt)其中tomcat使用JKS格式nginx使用PEM格式。 由于生成的证书是jks格式nginx不能直接用需要要转成PEM格式这要用到jks2pfx工具进行转换。
jks2pfx的命令格式JKS2PFX.bat keystore password alias exportname keystoreKeyStore文件绝对路径 passwordKeyStore文件对应的密码 alias生成证书CSR时所起的Alias别名 exportname准备导出的文件名称 (不要带扩展名)
JKS2PFX.bat d:/ssl/fastfly.com.keystore 123456 fastfly.com exportfile该命令将server.jks中别名为lgy.com的SSL证书导出运行后将在jks2pfx的按照目录产生3个文件 exportfile.key、exportfile.crt、exportfile.pfx
配置nginx
将exportfile.key、exportfile.crt复制到nginx的conf目录并将exportfile.crt重命名未exportfile.pem配置nginx.conf打开https
server {listen 80;server_name fastfly.com;#将http请求自动跳转到https上return 301 https://$server_name$request_uri;
}server {#监听443端口listen 443 ssl;server_name fastfly.com;#证书路径。从conf开始找ssl_certificate exportfile.pem;ssl_certificate_key exportfile.key;ssl_session_cache shared:SSL:1m;ssl_session_timeout 5m;ssl_ciphers HIGH:!aNULL:!MD5;ssl_prefer_server_ciphers on;location / {#反向代理http://127.0.0.1:8080proxy_pass http://127.0.0.1:8080;}
}