How to deploy a laravel project in a virtual space?

Source: Internet
Author: User
Tags symlink cpanel
Other frameworks only need to be uploaded, but you know that the lavarel entry file is under the public folder, so .... How to deploy it? Or is the whole upload followed by redirection so that all access is under public. Don't understand, please kindly advise. By the way, you only need to upload the entry file under the public... framework, but you know that the lavarel entry file is under the public folder, so .... How to deploy it? Or is the whole upload followed by redirection so that all access is under public. Don't understand, please kindly advise.

By the way, it is too difficult to put the entry file under public. Is there any special reason?

Reply content:

Other frameworks only need to be uploaded, but you know that the lavarel entry file is under the public folder, so .... How to deploy it? Or is the whole upload followed by redirection so that all access is under public. Don't understand, please kindly advise.

By the way, it is too difficult to put the entry file under public. Is there any special reason?

You need to face this problem-you do need to bind the domain name to the public folder. However, this binding does not need to be "real". It is also possible to use Symbolic Links for flexible implementation. (That is, if the binding location cannot be changed, replace the binding location with a symbolic link pointing to the desired location)

For common Linux platform PHP space:

  • For DA, there is essentially no primary domain name concept, and each domain name is bound~/domains/yourdomain.com/public_html
  • For cPanel, the primary domain name is bound~/public_html
  • CPanel's Addon Domains can customize the binding location (The problem is solved naturally)

Therefore, for the above situations 1 and 2, you can install laravel in another place, delete the original folder as the binding location, and replace it with a symbolic link. You can use the php symlink () function to create a symbolic link.

I am here to ask the questions answered above.
Where is symlink () used? Also, can I directly create a link file to/public/index. php In the root directory of the laravel project and name it index. php? Please help me. Thank you!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.