ryoluo/sail-ssl 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

ryoluo/sail-ssl

最新稳定版本:v1.4.0

Composer 安装命令:

composer require ryoluo/sail-ssl

包简介

Laravel Sail plugin to enable SSL (HTTPS) connection with Nginx.

README 文档

README

Version Downloads License Test

Laravel Sail plugin to enable SSL (HTTPS) connection with Nginx.

Install

You need to setup Laravel Sail environment before using the plugin.

With local PHP / Composer:

composer require ryoluo/sail-ssl --dev
php artisan sail-ssl:install
./vendor/bin/sail up

With Sail container:

./vendor/bin/sail up -d
./vendor/bin/sail composer require ryoluo/sail-ssl --dev
./vendor/bin/sail artisan sail-ssl:install
./vendor/bin/sail down
./vendor/bin/sail up

After containers started, you can access https://localhost.

Environment variables

  • SERVER_NAME
    • Determine server_name directive in nginx.conf
    • Default: localhost
  • APP_SERVICE
    • Specify Laravel container name in docker-compose.yml
    • Default: laravel.test
  • HTTP_PORT
    • Port to forward Nginx HTTP port
    • By default, request for this port would redirect to SSL_PORT
    • Default: 8000
  • SSL_PORT
    • Port to forward Nginx HTTPS port
    • Default: 443
  • SSL_DOMAIN
    • The Common Name to use in the SSL certificate, e.g. SSL_DOMAIN=*.mydomain.test
    • Required to generate a valid certificate for a domain other than localhost
    • Default: localhost
  • SSL_ALT_NAME
    • The Subject Alternative Name to use in the SSL certificate, e.g. SSL_ALT_NAME=DNS:localhost,DNS:mydomain.test
    • Required to generate a valid certificate for a domain other than localhost
    • Default: DNS:localhost

Configure Nginx

./nginx/templates/default.conf.template will be published.

php artisan sail-ssl:publish

Contribution

Feel free to create a PR!

统计信息

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

GitHub 信息

  • Stars: 187
  • Watchers: 2
  • Forks: 24
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-06-07