域名的ssl证书安装 [英] ssl certificate installation for domain name

查看:95
本文介绍了域名的ssl证书安装的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

现在我已经安装了ssl,当我在http://abc.com和https://abc.com打开时,两者都打开完美但现在我需要强制打开https,即使人们只键入http ..



i已经厌倦了httpd.conf文件,但代码如下,但仍无结果



RewriteEngine On

#这将启用重写功能



RewriteCond%{HTTPS}!= on

#这将检查以确保连接是还没有HTTPS



RewriteRule ^ /?foldertosecure /(.*)https://%{abc.com} / foldertosecure / $ 1 [R,L]

#此规则会将使用/ secure /任何部分的所有用户重定向到同一位置但使用HTTPS。

#ie http://www.abc/foldertosecure/到https://www.abc.com/foldertosecure/

#这意味着如果你不想强制所有目录的HTTPS,你可以强制它为网站的特定子部分。







i正在研究java spring我们需要保护它的网站我的意思是从http到https,我已经安装了SSL。当我尝试打开https://abc.in然后它工作正常,但当我尝试打开https://abc.in/abcadmin然后它将显示代码背后我在一些网站测试正确安装然后它显示它已安装正确。



到目前为止尝试:已安装并重新安装SSL并更改了httpd.conf文件并重新启动了tomcat服务器

解决方案

1 [R,L]

#此规则会将使用/ secure /任何部分的所有用户重定向到同一位置但使用HTTPS。

#ie http://www.abc/foldertosecure/ to https://www.abc.com/foldertosecure/

#这意味着如果您不想为所有目录强制使用HTTPS可以强制它为网站的特定子部分。







i我正在研究java spring我们需要保护它的网站我的意思是从http到https,我已经安装了SSL。当我尝试打开https://abc.in然后它工作正常,但当我尝试打开https://abc.in/abcadmin然后它将显示代码背后我在一些网站测试正确安装然后它显示它已安装正确。



到目前为止尝试:已安装并重新安装SSL并更改了httpd.conf文件并重新启动了tomcat服务器

Now i have installed ssl and when i open in http://abc.com and https://abc.com both opens perfectly but now i need to force open https even when people type http only..

i have tired httpd.conf file with below codes but still no result

RewriteEngine On
# This will enable the Rewrite capabilities

RewriteCond %{HTTPS} !=on
# This checks to make sure the connection is not already HTTPS

RewriteRule ^/?foldertosecure/(.*) https://%{abc.com}/foldertosecure/$1 [R,L]
# This rule will redirect all users who are using any part of /secure/ to the same location but using HTTPS.
# i.e. http://www.abc/foldertosecure/ to https://www.abc.com/foldertosecure/
# This means if you dont want to force HTTPS for all directories you can force it for a specific sub-section of the site.



i am working on java springs website where we need to make it secured i mean from http to https and i have installed SSL. when i try opening https://abc.in then it works fine but when i try opening https://abc.in/abcadmin then it will show code behind also i tested in some website for correct installation then it showed it has installed correct.

tried so far: installed and reinstalled SSL and changed httpd.conf files and did trial and error restarting tomcat server

解决方案

1 [R,L]
# This rule will redirect all users who are using any part of /secure/ to the same location but using HTTPS.
# i.e. http://www.abc/foldertosecure/ to https://www.abc.com/foldertosecure/
# This means if you dont want to force HTTPS for all directories you can force it for a specific sub-section of the site.



i am working on java springs website where we need to make it secured i mean from http to https and i have installed SSL. when i try opening https://abc.in then it works fine but when i try opening https://abc.in/abcadmin then it will show code behind also i tested in some website for correct installation then it showed it has installed correct.

tried so far: installed and reinstalled SSL and changed httpd.conf files and did trial and error restarting tomcat server


这篇关于域名的ssl证书安装的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆