text Kirby nginx配置
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了text Kirby nginx配置相关的知识,希望对你有一定的参考价值。
#######################
#######################
# KIRBY-CONFIGURATION #
# block content
location ~ ^/content/(.*).(txt|md|mdown)$
{
rewrite ^/content/(.*).(txt|md|mdown)$ /error redirect;
}
# block all files in the site folder from being accessed directly
location ~ ^/site/(.*)$
{
rewrite ^/site/(.*)$ /error redirect;
}
# block all files in the kirby folder
location ~ ^/kirby/(.*)$
{
rewrite ^/kirby/(.*)$ /error redirect;
}
# site links
location /
{
try_files $uri $uri/ /index.php?$uri&$args;
# cache static assets
if ($request_uri ~ \.(jpg|jpeg|png|gif|ico|svg|woff|ttf|woff2|otf|xml|pdf|eot|json)$) {
expires 1M;
access_log off;
add_header Cache-Control "public";
add_header Access-Control-Allow-Origin *;
}
}
# deny access to .htaccess files
location ~ /\.ht
{
deny all;
}
#######################
#######################
以上是关于text Kirby nginx配置的主要内容,如果未能解决你的问题,请参考以下文章
markdown 简单的联系表格在Kirby 3
php Kirby CMS - 结构域中的图像
20171208校内训练
text [nginx]配置文件#nginx
text 酒店alaedin nginx配置
text 羽毛.js的初始nginx配置