lighttpd安装和配置https

bash 复制代码
apt install lighttpd
apt-get install php-cgi
lighttpd-enable-mod fastcgi fastcgi-php
service lighttpd force-reload

lighttpd配置https

复制代码
sudo nano /etc/lighttpd/lighttpd.conf

加入:

复制代码
server.modules += ("mod_openssl")
$SERVER["socket"] == "0.0.0.0:443" {
    ssl.engine = "enable"
    ssl.privkey= "/home/ubuntu/ssl/key.pem"
    ssl.pemfile= "/home/ubuntu/ssl/fullchain.pem"
    ssl.openssl.ssl-conf-cmd = ("MinProtocol" => "TLSv1.2") # (recommended to accept only TLSv1.2 and TLSv1.3)
    #ssl.ca-file= "/etc/lighttpd/certs/www.example.com/chain.pem" # (needed in $SERVER["socket"] before lighttpd 1.4.56 if ssl.pemfile in $HTTP["ho>
}

ssl.privkey私钥

ssl.pemfile公钥

重启lighttpd

为了重定向所有网络主机到它们的HTTPS安全访问方式,用以下内容取代之前的socket 80端口配置:

复制代码
server.modules += ( "mod_redirect" )
复制代码
$SERVER["socket"] == ":80" {
  $HTTP["host"] =~ ".*" {
    url.redirect = (".*" => "https://%0$0")
  }
}
相关推荐
win x7 小时前
深入理解HTTPS协议加密流程
网络协议·http·https
仙俊红7 小时前
从 Filter / Interceptor 到 HTTPS
网络协议·http·https
游戏开发爱好者87 小时前
日常开发与测试的 App 测试方法、查看设备状态、实时日志、应用数据
android·ios·小程序·https·uni-app·iphone·webview
liann1197 小时前
3.1_网络——基础
网络·安全·web安全·http·网络安全
2501_915106329 小时前
app 上架过程,安装包准备、证书与描述文件管理、安装测试、上传
android·ios·小程序·https·uni-app·iphone·webview
yixvxi1 天前
RFC 8659:DNS CAA资源记录
服务器·https·ssl
三水不滴1 天前
计算机网络核心网络模型
经验分享·笔记·tcp/ip·计算机网络·http·https
SunflowerCoder1 天前
基于插件化 + Scriban 模板引擎的高效 HTTP 协议中心设计
http·c#
Remember_9931 天前
MySQL 索引详解:从原理到实战优化
java·数据库·mysql·spring·http·adb·面试
404Clukay1 天前
Windows Server 配置 Let‘s Encrypt 免费 HTTPS 证书(WACS + Nginx 自动化方案)
windows·nginx·https