zoukankan      html  css  js  c++  java
  • apache https配置

    upupw配置https耽搁了一天时间,终于配置好了。现在简单整理一下过程:

    1.安装upupw环境,百度教程

    2.下载https安全证书,我这里从阿里云上下载的,解压压缩包,把apache文件夹下的三个文件复制到服务器上,参考路径

    接下来就是配置httpd.conf文件了

    LoadModule ssl_module modules/mod_ssl.so;

    LoadModule socache_shmcb_module modules/mod_socache_shmcb.so

    Include conf/extra/httpd-ssl.conf

    找到这三行去掉前面的#。

    然后配置配置conf/extra/下面的httpd-ssl.conf文件

    如下

    <VirtualHost _default_:443>
    DocumentRoot "C:UPUPWhtdocsxcx"
    ServerName xcx.aaaa.cc:443
    ServerAlias xcx.aaaaa.cc
    ServerAdmin webmaster@example.com
    DirectoryIndex index.html index.htm index.php default.php app.php u.php
    ErrorLog logs/example_error.log
    CustomLog logs/example_access.log
    "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x "%r" %b"
    SSLEngine on
    SSLCertificateFile "C:UPUPWApache2conf2_xcx.yesandno.cc.crt"
    SSLCertificateKeyFile "C:UPUPWApache2conf3_xcx.yesandno.cc.key"
    <Directory "C:UPUPWhtdocsxcx">
    SSLOptions +StdEnvVars
    AllowOverride All
    Require all granted
    </Directory>

    主要是网站的路径和证书路径写对,这里只引用了两个证书文件,很奇怪吧,原因我也不清楚,只是不要第一个就对了,第一个会导致apache 启动不起来。这个坑也是别人发现的。

    参考链接https://bbs.aliyun.com/read/309174.html

  • 相关阅读:
    day35-python-网络编程
    oc-继承(inherit) 方法重写 继承与组合
    oc-self关键字
    oc-类方法
    oc-封装 get set方法
    oc-匿名对象
    oc-函数命名
    oc-函数,方法,类
    解决"authentication token manipulation error"
    让tomcat自动定位到项目
  • 原文地址:https://www.cnblogs.com/bwkj/p/7205125.html
Copyright © 2011-2022 走看看