小编Chr*_*hou的帖子

Laravel 部署共享托管子域

您好,我花了几个小时让我的网站在共享主机上运行,​​但没有发生任何事情(在本地还可以),搜索了几个主题并遵循了教程,但无法解决无法加载引导程序和 livewire 组件的问题。

我按照经典步骤将 public 文件夹复制到子域的根目录,其他文件位于子域路径内的单独文件夹(如 Laravel 文件夹)中,我更改了 public/index.php 并得到了类似的内容

正如您所看到的,Livewire 和引导程序不起作用。

我还尝试让文件夹保持原始状态并公开路径,结果是这样的一切正常!

不支持 css 和 livewire 的索引路径:

<?php

use Illuminate\Contracts\Http\Kernel;
use Illuminate\Http\Request;

define('LARAVEL_START', microtime(true));

/*
|--------------------------------------------------------------------------
| Check If Application Is Under Maintenance
|--------------------------------------------------------------------------
|
| If the application is maintenance / demo mode via the "down" command we
| will require this file so that any prerendered template can be shown
| instead of starting the framework, which could cause an exception.
|
*/

if …
Run Code Online (Sandbox Code Playgroud)

hosting shared-hosting laravel

1
推荐指数
1
解决办法
2336
查看次数

标签 统计

hosting ×1

laravel ×1

shared-hosting ×1