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

推荐订阅源

T
The Blog of Author Tim Ferriss
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
云风的 BLOG
云风的 BLOG
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
P
Palo Alto Networks Blog
D
Docker
H
Hackread – Cybersecurity News, Data Breaches, AI and More
S
Schneier on Security
Engineering at Meta
Engineering at Meta
I
InfoQ
L
LangChain Blog
Cyberwarzone
Cyberwarzone
T
Tenable Blog
WordPress大学
WordPress大学
P
Privacy & Cybersecurity Law Blog
罗磊的独立博客
Apple Machine Learning Research
Apple Machine Learning Research
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Jina AI
Jina AI
C
CERT Recently Published Vulnerability Notes
Scott Helme
Scott Helme
博客园 - 三生石上(FineUI控件)
酷 壳 – CoolShell
酷 壳 – CoolShell
Know Your Adversary
Know Your Adversary
D
Darknet – Hacking Tools, Hacker News & Cyber Security
The Last Watchdog
The Last Watchdog
Last Week in AI
Last Week in AI
Cloudbric
Cloudbric
S
SegmentFault 最新的问题
爱范儿
爱范儿
Application and Cybersecurity Blog
Application and Cybersecurity Blog
博客园 - 叶小钗
AI
AI
T
Tor Project blog
I
Intezer
T
Threatpost
www.infosecurity-magazine.com
www.infosecurity-magazine.com
V
Visual Studio Blog
N
News and Events Feed by Topic
Latest news
Latest news
S
Security Affairs
博客园 - Franky
Microsoft Security Blog
Microsoft Security Blog
C
Cyber Attacks, Cyber Crime and Cyber Security
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
B
Blog RSS Feed
C
Cybersecurity and Infrastructure Security Agency CISA
Hugging Face - Blog
Hugging Face - Blog
小众软件
小众软件
S
Securelist

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个机房按小时计费,支持支付宝,【点击查看】。