Chevereto Nginx 伪静态Rewrite规则 Chevereto 是目前最为强大的 PHP 图床系统,通过它可部署多用户公开或私有的图片存储服务,现在 Chevereto 出了免费的版本,小伙伴可以围观一下。https://github.com/Chevereto/Chevereto-FreeChevereto 默认提供基于 Apache 环境的伪静态规则,如果服务器是 Nginx 则需要设置以下Rewrite 伪静态规则:- # Image not found replacement
- location ~* (jpe?g|png|gif) {
- log_not_found off;
- error_page 404 /content/images/system/default/404.gif;
- }
- # CORS header (avoids font rendering issues)
- location ~ \.(ttf|ttc|otf|eot|woff|woff2|font.css|css|js)$ {
- add_header Access-Control-Allow-Origin "*";
- }
- # Pretty URLs
- location / {
- try_files $uri $uri/ /index.php?$query_string;
- }
- location /admin {
- try_files $uri /admin/index.php?$args;
- }
版权声明 1、本站所有资源来源于网络搜集和会员分享 2、本站所有程序仅供大家学习和参考,不得进行商业用途 3、如果觉得程序还可以、请购买官方正版 4、对不遵守本声明或其他违法、恶意使用本网站内容者,本网站保留追究其法律责任的权利。 唯一网址: https://bbs.zonghengtx.cn/thread-1944-1-1.html |