lucenarenato / sail-ssl
Laravel 5,6,7 e php7.2 - Laravel Sail plugin to enable SSL (HTTPS) connection with Nginx.
1.2.0
2023-01-06 16:18 UTC
Requires
- php: ^7.2|^7.3|^8.0
- illuminate/console: ^5.0|^6.0|^7.0|^8.0|^9.0
- illuminate/contracts: ^5.0|^6.0|^7.0|^8.0|^9.0
- illuminate/support: ^5.0|^6.0|^7.0|^8.0|^9.0
Requires (Dev)
- lucenarenato/sail-7.x: 1.x-dev
- orchestra/testbench: ^3.5|^5.0|^6.0|^7.0
- phpunit/phpunit: ^5.0|^8.4|^9.0|^9.5
README
Laravel 7 e php7.2 - 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 lucenarenato/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 lucenarenato/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
- Determine
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
Configure Nginx
./nginx/templates/default.conf.template
will be published.
php artisan sail-ssl:publish
Contribution
Feel free to create a PR!