Jekyll站点的Apache配置

时间:2018-01-17 18:09:26

标签: apache jekyll

当我在本地运行Jekyll npm时,我注意到我可以浏览我的视频,例如http://127.0.0.1:4000/videos/towards-holistic-approach。该网址没有`yarn install v1.3.2 info No lockfile found. [1/4] Resolving packages... [2/4] Fetching packages... [3/4] Linking dependencies... [4/4] Building fresh packages... info Lockfile not saved, no dependencies. Done in 0.09s.` 扩展名,但有效。

当我将Jekyll bundle exec jekyll serve目录上传到我的Apache服务器时,这些URL不起作用。该网址仅在我手动向其添加.html时才有效,例如https://mydomain/videos/towards-holistic-approach

如何配置Apache以服务Jekyll网站?

顺便说一句,我发现这已经https://www.askapache.com/htaccess-file/htaccess/src-richarizardd-made-mistakes-jekyll-master-htaccess/

不幸的是,这在我的案例中并不起作用。我试过例如

_site

这对https://mydomain/videos/towards-holistic-approach有帮助,但在更改后我将无法访问我网站的根目录,例如https://mydomain不再有效。

我现在认为Jekyll确实需要非常具体的Apache配置才能正常运行,但https://jekyllrb.com/不提供任何信息。

1 个答案:

答案 0 :(得分:0)

我在新的Centos7 apache环境中遇到了同样的问题。 在虚拟主机中设置Multiviews选项时解决了该问题:

Options +MultiViews

我在jekyllrb.com文档的永久链接部分找到了描述:https://jekyllrb.com/docs/permalinks/#apache

相关问题