惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Cisco Talos Blog
Cisco Talos Blog
阮一峰的网络日志
阮一峰的网络日志
云风的 BLOG
云风的 BLOG
D
Docker
Vercel News
Vercel News
IT之家
IT之家
Recent Announcements
Recent Announcements
Last Week in AI
Last Week in AI
V
Visual Studio Blog
Engineering at Meta
Engineering at Meta
腾讯CDC
Google DeepMind News
Google DeepMind News
I
InfoQ
博客园 - 三生石上(FineUI控件)
Apple Machine Learning Research
Apple Machine Learning Research
The GitHub Blog
The GitHub Blog
博客园 - Franky
The Cloudflare Blog
A
About on SuperTechFans
有赞技术团队
有赞技术团队
Y
Y Combinator Blog
T
Tenable Blog
P
Proofpoint News Feed
Recorded Future
Recorded Future
Security Latest
Security Latest
H
Hackread – Cybersecurity News, Data Breaches, AI and More
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
博客园 - 聂微东
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Google Online Security Blog
Google Online Security Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Simon Willison's Weblog
Simon Willison's Weblog
The Last Watchdog
The Last Watchdog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
N
News and Events Feed by Topic
TaoSecurity Blog
TaoSecurity Blog
U
Unit 42
The Hacker News
The Hacker News
Martin Fowler
Martin Fowler
T
Threat Research - Cisco Blogs
NISL@THU
NISL@THU
F
Full Disclosure
M
MIT News - Artificial intelligence
人人都是产品经理
人人都是产品经理
Hugging Face - Blog
Hugging Face - Blog
V
V2EX
Project Zero
Project Zero

Rat's Blog - Caddy

使用Caddy申请免费的Let’s Encrypt泛域名SSL证书 - Rat's Blog Caddy环境下一些Web应用程序的配置参考 - Rat's Blog 小内存VPS安装Caddy+PHP 7+Sqlite 3环境,并快速搭建Typecho博客 - Rat's Blog Aria2+Caddy+Rclone+GDlist+Aria2Ng+Google Drive一键安装脚本 - Rat's Blog Linux VPS使用Python/Caddy快速搭建文件分享平台 - Rat's Blog Ghost博客一键安装脚本,使用Caddy作为反向代理,并自动签发SSL证书 - Rat's Blog 利用Caddy快速简单的部署反向代理/镜像,自动签发SSL证书 - Rat's Blog 利用Caddy快速搭建Aria2控制前端webui-aria2或者AriaNg - Rat's Blog Caddy Web Server一键管理(开始/停止/安装/更新/卸载)脚本 - Rat's Blog
Caddy环境下WordPress博客伪静态设置 - Rat's Blog
博主: Rat's · 2018-06-22 · via Rat's Blog - Caddy
  •  发布时间:
  •  28081 次浏览
  •   13 条评论
  •  1197 字数
  • 分类: 建站知识
  1.  首页
  2. 正文  
  3. 分享到:

说明:博客讲了很多Caddy教程,Caddy是一个极简的HTTP服务器,支持HTTP/2静态网页服务器,比起Nginx简单很多,而且安装配置很方便,也节省内存,申请SSL证书极其方便,有时候用来搭建博客也是一种不错的选择。这里说下Caddy环境下Wordpress伪静态配置文件。

配置

伪静态参数:

rewrite {
  if {path} not_match ^\/wp-admin
  to {path} {path}/ /index.php?{query}
}

顺便说下Wordpress博客整体配置文件。

#域名301重定向
www.moerats.com {
  redir https://moerats.com{url}
}
#域名配置
moerats.com {
  #wordpress程序所在文件夹
  root /wordpress
  #自动签发ssl证书,邮箱随便填
  tls admin@moerats.com
  gzip
  #PHP设置
  fastcgi / 127.0.0.1:9000 php
  #伪静态设置
  rewrite {
    if {path} not_match ^\/wp-admin
    to {path} {path}/ /index.php?{query}
  }
}

如果想使用自己的ssl证书,请将tls一行参数改为tls /root/ssl.crt /root/ssl.key后面为证书路径。

关于PHP设置,有时候填入127.0.0.1:9000可能不能用,这时候我们需要打开php-fpm配置文件,这里以php7为例。先从配置文件里找到listen = /run/php/php7.0-fpm.sock,然后将后面的填入到配置文件,比如:

fastcgi / /run/php/php7.0-fpm.sock php

相关教程


版权声明:本文为原创文章,版权归 Rat's Blog 所有,转载请注明出处!

本文链接:https://www.moerats.com/archives/656/

如教程需要更新,或者相关链接出现404,可以在文章下面评论留言。

Vultr新用户注册送100美元/16个机房按小时计费,支持支付宝,【点击查看】。