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!