博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
云服务器(uCloud)部署java web项目(七) apacheHTTPS转发到tomctHTTPS
阅读量:4347 次
发布时间:2019-06-07

本文共 1015 字,大约阅读时间需要 3 分钟。

步骤如下:

    (1)cd /etc/apache2/mods-availalbe

             cp rewrite.load ssl.conf  ssl.load /etc/apache2/mods-enabled  (加载rewrite.load ssl.conf  ssl.load)

    (2)vi /etc/apache2/sites-available/default-ssl.conf   (配置apache,添加如下代码:)

           

           SSLProxyEngine On

          SSLProxyVerify none

          SSLProxyCheckPeerCN off
          SSLProxyCheckPeerName off
          SSLProxyCheckPeerExpire off
          RequestHeader set Front-End-Https "On"
          ProxyVia On
          ProxyPreserveHost On
          ProxyRequests Off

          ProxyPass / https://127.0.0.1:8443/

          ProxyPassReverse / https://127.0.0.1:8443/

          <Proxy *>

            Order deny,allow
             Allow from all
          </Proxy>
          <Location />
          Require all granted
          </Location>

         RewriteEngine On

         Options +FollowSymLinks

         RewriteCond %{SERVER_PORT} !^8443$

         RewriteCond %{HTTP_HOST} !^www\. [NC]
         RewriteRule ^(.*)$ https://www.%{HTTP_HOST}$1 [L,R=301]

       (3)保存退出:wq

       (4)sudo apache2ctl configtest           (测试,如果现实OK,正面成功,如果出错,可能是关联文件没有加载到mods-enabled,按照步骤(1)加载相应的文件)

       (5)sudo /etc/init.d/apache2 restart    (重启apache)

       (6)输入:https://localhost:443            (如果看到tomcat首页,并且是https,说明配置成功)

 

转载于:https://www.cnblogs.com/suosui/p/7212548.html

你可能感兴趣的文章
转 Datatables中文API——基本参数
查看>>
FMS发布视频流H.264如何设置
查看>>
边工作边刷题:70天一遍leetcode: day 14-1
查看>>
简单地做一下“回到顶部”按钮,用jQuery实现其隐藏和显示
查看>>
*AtCoder Regular Contest 096E - Everything on It
查看>>
poj1958 Strange Towers of Hanoi
查看>>
javascript中window.event事件用法详解
查看>>
【分享】沪江网提供的每日一句API
查看>>
scrapy爬虫框架之理解篇(个人理解)
查看>>
nginx配置PATH_INFO模式
查看>>
Zend 无限试用
查看>>
codeferces 149D Coloring Brackets 区间dp
查看>>
剑指offer例题4—替换空格
查看>>
ssh-keygen -t rsa P “” -f ~/.ssh/id_rsa不提示直接生成密钥
查看>>
shell学习之cut
查看>>
P2P入门及经典文章
查看>>
Oracle安装时忘记解锁scott用户的解决方案
查看>>
正则表达式之基础知识
查看>>
dedecms添加/编辑文章如何把附加选项去掉默认勾选状态
查看>>
MySQL获取某个时间范围内的数据 TO_DAYS(date)函数
查看>>