如何在子域上上传laravel项目? [英] How to upload laravel project on subdomain?
问题描述
我想在一个子域中托管一个laravel项目.为此,首先,我创建一个子域名注册.
I want to host a laravel project in a subdomain.. For that first First I create a subdomain name registraion.
然后在publicm_html/registraion内部,上传项目文件. 但是当我看到url上的项目时,只看到文件而不是我存储的项目.
And inside the publicm_html/registraion i upload the project file. But when I see the project on url I saw only files not the project I stored.
上传laravel项目有什么问题? 谁能帮我找到答案?
what's the problem of uploading the laravel project? Can anyone help me to find it out?
推荐答案
假定您正在使用cPanel创建子域.以下是为laravel-project设置子域所需的一般步骤.
Assuming you are using cPanel to create subdomain. Below are the general steps that are required to setup sub-domain for laravel-project.
- 创建您的子域
- 将您的laravel项目上传到子域主目录.
- 上传所有文件后.更新您的子域文档根目录以指向
public_html/registration/public/
文件夹,您可以从cPanel 请参见.
- Create your sub-domain
- Upload your laravel project to the sub-domain home directory.
- After you have uploaded all the files. Update your sub-domain document-root to point to
public_html/registration/public/
folder, you can do this from sub-domain manager inside cPanel see.
按照1-3步操作后,您应该会看到laravel项目.但是,您还需要在laravel的bootstrap
,storage
文件夹上设置适当的文件权限,以使其启动并运行.
After following 1-3 steps you should see your laravel project. However you also need to setup proper file permissions on laravel's bootstrap
, storage
folder to get it up and running.
让我们知道这是否对您有帮助.
Let us know if this helps you or not.
这篇关于如何在子域上上传laravel项目?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!