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

推荐订阅源

Google DeepMind News
Google DeepMind News
H
Help Net Security
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
V
Vulnerabilities – Threatpost
MongoDB | Blog
MongoDB | Blog
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
A
Arctic Wolf
The GitHub Blog
The GitHub Blog
Security Latest
Security Latest
G
GRAHAM CLULEY
Cyberwarzone
Cyberwarzone
S
Schneier on Security
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
P
Privacy & Cybersecurity Law Blog
IT之家
IT之家
D
Darknet – Hacking Tools, Hacker News & Cyber Security
博客园 - 聂微东
T
Threat Research - Cisco Blogs
AWS News Blog
AWS News Blog
The Hacker News
The Hacker News
B
Blog RSS Feed
云风的 BLOG
云风的 BLOG
Scott Helme
Scott Helme
P
Proofpoint News Feed
T
The Exploit Database - CXSecurity.com
L
LangChain Blog
F
Full Disclosure
I
Intezer
V
V2EX
C
Cyber Attacks, Cyber Crime and Cyber Security
Cisco Talos Blog
Cisco Talos Blog
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Spread Privacy
Spread Privacy
美团技术团队
Engineering at Meta
Engineering at Meta
C
Cybersecurity and Infrastructure Security Agency CISA
罗磊的独立博客
T
Tenable Blog
D
DataBreaches.Net
M
MIT News - Artificial intelligence
S
Securelist
C
CERT Recently Published Vulnerability Notes
Recent Announcements
Recent Announcements
Microsoft Azure Blog
Microsoft Azure Blog
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
NISL@THU
NISL@THU
The Register - Security
The Register - Security
L
LINUX DO - 热门话题
P
Palo Alto Networks Blog

Rat's Blog - wordpress

零基础的萌新搭建属于自己的Typecho/WordPress等博客教程 - Rat's Blog 小内存VPS一键安装Typecho/WordPress/Zblog/Kodexplorer及整站备份等 - Rat's Blog Caddy环境下一些Web应用程序的配置参考 - Rat's Blog VPS服务器如何优化/加快网站的访问速度 - Rat's Blog 使用VPS采集1024贴图区,并自动发布到WordPress博客 - Rat's Blog SC private letter: 一个基于serverchan微信推送服务的私信发送站 - Rat's Blog 好看的WordPress主题:Kratos 2.5.8主题修改美化版,支持PJAX - Rat's Blog 给WordPress、Emlog等博客网站添加下雪特效,附带Typecho下雪插件 - Rat's Blog WordPress博客后台自动更新后,还一直提示更新的解决方法 - Rat's Blog
Caddy环境下WordPress博客伪静态设置 - Rat's Blog
博主: Rat's · 2018-06-22 · via Rat's Blog - wordpress
  •  发布时间:
  •  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个机房按小时计费,支持支付宝,【点击查看】。