当我运行它时输出:
php artisan serve --port=80
Laravel development server started on http://localhost:80
如何让它在后台运行,当我退出控制台时服务器停止。
最佳答案
简答:不要
Web 服务器 artisan
使用的是 PHP 内置 Web 服务器,它不用于除开发以外的任何场景,正如来自 Built-in web server 的摘录所展示的那样。文档:
Warning This web server was designed to aid application development. It may also be useful for testing purposes or for application demonstrations that are run in controlled environments. It is not intended to be a full-featured web server. It should not be used on a public network.
The web server runs a only one single-threaded process, so PHP applications will stall if a request is blocked.
关于php - Laravel 如何在生产环境中启动服务器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34978857/