当前位置: 移动技术网 > 网络运营>服务器>Linux > 配置apache默认使用ssl的方法

配置apache默认使用ssl的方法

2019年05月07日  | 移动技术网网络运营  | 我要评论
然后在下面添加,具体位置似乎没有大的关系,可以自行测试一下: 复制代码 代码如下:rewriteengine on rewriterule /.* https://www.
然后在下面添加,具体位置似乎没有大的关系,可以自行测试一下:
复制代码 代码如下:

rewriteengine on
rewriterule /.* https://www.example.com/ [r]


替换url为你需要的就好了。看到其它地方还添加了其他的选项,我这里就采用了最基本的官方说明了。有兴趣的可以自己在研究一下。

p: apache的官方文档有个小错误,它用了http而不是https,那不是没用了么,呵呵。

参考:

http://httpd.apache.org/docs/1.3/misc/howto.html

http://www.cyberciti.biz/tips/howto-apache-force-https-secure-connections.html

http://www.linuxquestions.org/questions/fedora-35/configuring-automatic-redirects-from-port-80-to-port-443-with-bundled-apache-server-609598/

如您对本文有疑问或者有任何想说的,请点击进行留言回复,万千网友为您解惑!

相关文章:

验证码:
移动技术网