assurdeal/sail-https
Composer 安装命令:
composer require assurdeal/sail-https
包简介
Enable https on Laravel sail powered apps.
README 文档
README
This package allows you to use HTTPS in your Laravel Sail development environment.
Installation
You can install the package via composer:
composer require assurdeal/sail-https --dev
You can publish the config file with:
php artisan vendor:publish --tag="sail-https-config"
Usage
Add your authorized domains to your .env file:
SAIL_HTTPS_AUTHORIZED_DOMAINS=example.text,example2.test
Add the following to your docker-compose.yml file:
volumes: sail-caddy: driver: local
### Caddy Server reverse proxy ############################ caddy: image: caddy:latest restart: unless-stopped ports: - '${APP_SSL_PORT:-443}:443' volumes: - './vendor/assurdeal/sail-https/.docker/caddy/Caddyfile:/etc/caddy/Caddyfile' - sail-caddy:/data - sail-caddy:/config networks: - sail
Set up SSL certificate
First get the Caddy container ID
docker ps | grep caddy
Then copy the Certificate from the Container
docker cp {container_id}:/config/caddy/pki/authorities/local/root.crt ~/Desktop
MacOS
Finally, open up "Keychain Access.app" and drag and drop the certificate into the "login" keychain. Open the certificate (it should be called something like "Caddy Local Authority") and configure it to "Always Trust".
Windows
-
To add, use the command: certutil -addstore -f "ROOT" root.crt
-
To remove, use the command: certutil -delstore "ROOT" serial-number-hex
Linux (Ubuntu, Debian)
- To add:
- Copy your CA to dir
/usr/local/share/ca-certificates/ - Use command:
sudo cp root.crt /usr/local/share/ca-certificates/root.crt - Update the CA store:
sudo update-ca-certificates
- Copy your CA to dir
- To remove:
- Remove your CA.
- Update the CA store:
sudo update-ca-certificates --fresh
Note: Restart Kerio Connect to reload the certificates in the 32-bit versions or Debian 7.
Linux (CentOs 6)
- Install the ca-certificates package:
yum install ca-certificates - Enable the dynamic CA configuration feature:
update-ca-trust force-enable - Add it as a new file to /etc/pki/ca-trust/source/anchors/:
cp root.crt /etc/pki/ca-trust/source/anchors/ - Use command:
update-ca-trust extract
Linux (CentOs 5)
Append your trusted certificate to file /etc/pki/tls/certs/ca-bundle.crt
cat root.crt >>/etc/pki/tls/certs/ca-bundle.crt
Note: Restart Kerio Connect to reload the certificates in the 32-bit version.
Testing
composer test
Credits
Big Thanks to all developers who worked hard to create something amazing!
Creator
Twitter: @PercyMamedy
GitHub: percymamedy
License
The MIT License (MIT). Please see License File for more information.
assurdeal/sail-https 适用场景与选型建议
assurdeal/sail-https 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 4.81k 次下载、GitHub Stars 达 3, 最近一次更新时间为 2023 年 03 月 13 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「php」 「https」 「laravel」 「dev-tools」 「sail」 「assurdeal」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 assurdeal/sail-https 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 assurdeal/sail-https 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 assurdeal/sail-https 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
A Laravel artisan based package to create the AWS (SES + SNS) infrastructure to receive email event notifications with Http/Https endpoint.
URL routing framework and requests/responses handler for PHP
Library implement an Online Certificate Status Protocol (OCSP) responder
Get information about the current HTTP request
Alfabank REST API integration
A simple component way to work with Cookies
统计信息
- 总下载量: 4.81k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 3
- 点击次数: 25
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-03-13