简体   繁体   English

如何在子域中安装Laravel?

[英]How to install Laravel in subdomain?

I have my site: http://www.markdev.com.br 我有我的网站: http : //www.markdev.com.br

, where the there is a subdomain (maestro.markdev.com.br) and there is an app for laravel that is in (public_html / subdomains / conductor). ,其中有一个子域(maestro.markdev.com.br),其中有一个用于laravel的应用程序(public_html /子域/导体)。

How do I do to run laravel normally when accessing the subdomain or path without getting error 500? 访问子域或路径时如何正常运行laravel而不出现错误500?

I appreciate all the attention 感谢所有的关注

You don't need to do anything special to install Laravel in a sub-domain as Laravel won't know either way - you just need to install it correctly and configure the sub-domain on your web server. 您不需要做任何特殊的事情就可以将Laravel安装在子域中,因为Laravel不会知道这两种方式-您只需要正确安装它并在Web服务器上配置子域即可。

So inside your public_html/subdomains/conductor directory you can install your Laravel project. 因此,在您的public_html/subdomains/conductor目录中,您可以安装Laravel项目。 Make sure that you run composer install to install all of the files and dependencies, and then set the folder permissions of storage and bootstrap/cache correctly. 确保运行composer install来安装所有文件和依赖项,然后正确设置storagebootstrap/cache的文件夹权限。

On your web-server end, set up a vhost to direct the request to the correct directory: 在您的网络服务器端,设置一个虚拟主机,将请求定向到正确的目录:

public_html/subdomains/conductor

Or link it to the public directory to prevent users having to type in maestro.markdev.com.br/public : 或将其链接到公共目录,以防止用户不得不输入maestro.markdev.com.br/public

public_html/subdomains/conductor/public

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM