apache服务器开启https

 时间:2024-10-14 03:52:20

1、生成https证书,测试使用,正式使用需要购买生成私钥文件 sudo openssl genrsa -aes256 -out service.key 1024然后按提示输入密码,文件生成成功

apache服务器开启https

3、配置apache,开启https打开httpd.conf文件:移除注释LoadModule ssl_module libexec/apache2/mod_ssl.soInclude /private/etc/apache2/extra/httpd-vhosts.conf

apache服务器开启https

4、修改httpd-vhosts.罕铞泱殳conf文件修改DocumentRoot "/Users/xun锾攒揉敫ao/website/upload" 为自己的网站路径指定证书和密钥文件路径SSLCertificateFile "/private/etc/apache2/server.crt"SSLCertificateKeyFile "/private/etc/apache2/server.key"

apache服务器开启https

5、重启apache用 sudo apachectl configtest 检测配置文件是否有错误(windows为httpd -t)sudo apachectl restart (windows为httpd -k restart)

apache服务器开启https
  • VS中如何设置加粗所选选项卡上的文本
  • 怎么用bat执行java应用程序
  • Synchronizing has encoountered a problem?
  • 如何设置Excel始终以默认编码保存网页
  • 如何使用JavaScript中的函数返回值打印不同的值
  • 热门搜索
    涿州旅游 青岛崂山旅游攻略 西安旅游景点门票 丽江市旅游局 九江旅游景点大全 右玉旅游 去西双版纳旅游 热门旅游城市 少华山旅游攻略 泰州旅游景点大全