分享web开发知识

注册/登录|最近发布|今日推荐

主页 IT知识网页技术软件开发前端开发代码编程运营维护技术分享教程案例
当前位置:首页 > 前端开发

Caddy环境下一些Web应用程序的配置参考

发布时间:2023-09-06 02:18责任编辑:郭大石关键词:Web配置

Caddy一个的英文轻量级的Web服务器,部署和配置很快,伏笔VPS也喜爱用,以来的使用范畴估量会越来越广,而就是目前一些Web应用程序的配置文件难找,信任许多人都有体验,这里伏笔VPS就罗列常用的一些程序的配置供参考。

配置

参数以下都需要填入配置文件Caddyfile里,且仅作参考。

1,Chevereto图床

example.com { ???root /var/www/chevereto ???fastcgi / /var/run/php/php7.0-fpm.sock php ???rewrite { ???????to {path} {path}/ /index.php?{query} ???}}

2,NextcloudDISK

my-nextcloud-site.com { ???root ??/var/www/nextcloud ???log ???/var/log/nextcloud_access.log ???errors /var/log/nextcloud_errors.log ???fastcgi / 127.0.0.1:9000 php { ???????env PATH /bin ???} ???????# checks for images ???????rewrite { ???????????ext .svg .gif .png .html .ttf .woff .ico .jpg .jpeg ???????r ^/index.php/(.+)$ ???????to /{1} /index.php?{1} ???} ???rewrite { ???????r ^/index.php/.*$ ???????to /index.php?{query} ???} ???# client support (e.g. os x calendar / contacts) ???redir /.well-known/carddav /remote.php/carddav 301 ???redir /.well-known/caldav /remote.php/caldav 301 ???# remove trailing / as it causes errors with php-fpm ???rewrite { ???????r ^/remote.php/(webdav|caldav|carddav|dav)(\/?)(\/?)$ ???????to /remote.php/{1} ???} ???rewrite { ???????r ^/remote.php/(webdav|caldav|carddav|dav)/(.+?)(\/?)(\/?)$ ???????to /remote.php/{1}/{2} ???} ???rewrite { ???????r ^/public.php/(dav|webdav|caldav|carddav)(\/?)(\/?)$ ???????to /public.php/{1} ???} ???rewrite { ???????r ^/public.php/(dav|webdav|caldav|carddav)/(.+)(\/?)(\/?)$ ???????to /public.php/{1}/{2} ???} ???# .htaccess / data / config / ... shouldn‘t be accessible from outside ???status 403 { ???????/.htaccess ???????/data ???????/config ???????/db_structure ???????/.xml ???????/README ???} ???header / Strict-Transport-Security "max-age=31536000;"}

临时只罗列这些常用的,如果需要你更多程序的Web配置,可以留言,伏笔VPS放量给你供给准确的配置文件。

希望以上的文章对各位有用,如果觉得不错给我点个喜欢吧!更多和球童环境下一些网络程序应用的配置参考相关的问题或者对巴黎服务器要备案吗有疑惑也欢迎大家咨询。

Caddy环境下一些Web应用程序的配置参考

原文地址:https://www.cnblogs.com/fubitech/p/9797224.html

知识推荐

我的编程学习网——分享web前端后端开发技术知识。 垃圾信息处理邮箱 tousu563@163.com 网站地图
icp备案号 闽ICP备2023006418号-8 不良信息举报平台 互联网安全管理备案 Copyright 2023 www.wodecom.cn All Rights Reserved