WordPress - Apache2 配置文件和开启重写模式
在开始尝试 WordPrss 时, 访问博客文章会出现错误:
The requested URL /hello-world-.html was not found on this server
查找各种答案, 发现是由 Apache2 未开启重写模式 导致的.
关于重写模式, 很多资源都是介绍修改 Apache2 httpd.conf, 但我找了很久都未找到 httpd.conf 文件.
Ubuntu 终端查找命令:
find / -name httpd.conf
实际上, Apache2 并没有 httpd.conf 配置文件, 真实的Apache2配置文件是 /etc/apache2/apache2.conf. Apache2 启动时默认自动读取该文件内的配置信息, 而其它的配置信息则是通过 Include 包含进来的.
如: