问题描述
我一直在寻找是否有一种方法可以使用Laravel的工匠为本地开发模拟SSL以便在没有运气的情况下提供HTTPS。
I have been searching around to see if there is a way I can mock SSL for local development using Laravel's artisan to serve HTTPS with no luck.
这是否可能如果是这样,怎么样?
Is this possible and if so, how?
我知道这是一个非常普遍的问题,但我在搜索中没有看到任何相关内容。
I understand this is a very general question, but I am not seeing anything on this in searches.
推荐答案
Laravel使用内置的PHP5.4开发服务器 php -S
()它是 artisan serve
命令(参见 Illuminate\Foundation\Console\ServeCommand
)。这只支持纯HTTP,所以不,这是不可能的。您最好的选择是使用设置为使用SSL / TLS的Vagrant框。
Laravel uses the in-built PHP5.4 development server php -S
(http://php.net/manual/en/features.commandline.webserver.php) for it's artisan serve
command (see Illuminate\Foundation\Console\ServeCommand
). This only supports plain HTTP, so no, this isn't possible. Your best bet would be to use a Vagrant box set up to work with SSL/TLS.
这篇关于Laravel php artisan用于模仿HTTPS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!