如何使用 Apache 在生产环境中启用 Laravel?
How do I turn on Laravel in production using Apache?
- 我已经在 CentOS 8 上安装了 Apache、MySQL、PHP、Composer、Laravel 等
- 我创建了一个 Apache VirtualHost,可以很好地为 PHP 提供 https 服务。
- 我在 VirtualHost 的子目录中有一个 Laravel 应用程序,它 运行 没有使用 SSL
php artisan serve
我的问题是:如何将它传送到 Apache VirtualHost 上的 运行?
我是否需要 index.php 重定向或包含某些内容?
我错过了什么?
TIA
解决方案是将虚拟主机的 DocumentRoot
指向 /laravel_app_root/public
再次感谢@matiaslauriti
- 我已经在 CentOS 8 上安装了 Apache、MySQL、PHP、Composer、Laravel 等
- 我创建了一个 Apache VirtualHost,可以很好地为 PHP 提供 https 服务。
- 我在 VirtualHost 的子目录中有一个 Laravel 应用程序,它 运行 没有使用 SSL
php artisan serve
我的问题是:如何将它传送到 Apache VirtualHost 上的 运行?
我是否需要 index.php 重定向或包含某些内容? 我错过了什么?
TIA
解决方案是将虚拟主机的 DocumentRoot
指向 /laravel_app_root/public
再次感谢@matiaslauriti