定制 assurdeal/sail-https 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

assurdeal/sail-https

最新稳定版本:v0.1.1

Composer 安装命令:

composer require assurdeal/sail-https

包简介

Enable https on Laravel sail powered apps.

README 文档

README

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

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

  1. To add, use the command: certutil -addstore -f "ROOT" root.crt

  2. To remove, use the command: certutil -delstore "ROOT" serial-number-hex

Linux (Ubuntu, Debian)

  1. 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
  2. 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)

  1. Install the ca-certificates package: yum install ca-certificates
  2. Enable the dynamic CA configuration feature: update-ca-trust force-enable
  3. Add it as a new file to /etc/pki/ca-trust/source/anchors/: cp root.crt /etc/pki/ca-trust/source/anchors/
  4. 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

Percy Mamedy

Twitter: @PercyMamedy
GitHub: percymamedy

License

The MIT License (MIT). Please see License File for more information.

统计信息

  • 总下载量: 4.81k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 3
  • 点击次数: 4
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 3
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-03-13

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固