Plesk for Linux
kb: how-to
ABT: Group A
Applicable to:
- Plesk for Linux
Question
Does Plesk support automatic way to deploy Laravel application?
Answer
Yes, use Laravel Toolkit extension.
Follow this instruction to install it.
Comments
13 comments
This is no good for a production site as the url requires /public
Hello @Mark,
Thanks for the feedback.
To avoid using /public you may configure a redirect to this page and use another URL, which is more comfortable for you.
Thanks
I have kept httpdocs as the web root folder but uploaded the app source code in a folder at the same level as httpdocs, then made httpdocs a symlink to the public folder in my app. Seems to work OK, the main issue is having to type in the full path to php and composer everytime I need to run commands as the OS php is recognised outside of the httpdocs folder.
Hi @Mark!
You can use full path to CLI of Plesk PHP version, here are all of them (that are installed of course):
# ls -l /opt/plesk/php/*/bin/php
-rwxr-xr-x 1 root root 4402920 Sep 14 11:53 /opt/plesk/php/5.6/bin/php
-rwxr-xr-x 1 root root 4613136 Sep 14 13:20 /opt/plesk/php/7.0/bin/php
-rwxr-xr-x 1 root root 4761744 Sep 14 13:19 /opt/plesk/php/7.1/bin/php
-rwxr-xr-x 1 root root 5020880 Sep 14 11:36 /opt/plesk/php/7.2/bin/php
And if you do not want to use a full path, and want shell 'php' to be '/opt/plesk/php/5.6/bin/php', not /usr/bin/php, you can create a shell alias for that.
Thanks, this is my next step I think, I'm just waiting to hear from tech support to see if it's safe to update the OS php version. If not I'll do as you said :)
Excuse me but I cannot change the option on "Access to the server over SSH". It is fixed on "Login prohibited" option. What should I do?
Hi @Mohamad!
The "Access to the server over SSH" has no "Login prohibited" option
It takes only the next options:
The "Login prohibited" option can be selected for the "Access to the server over Remote Desktop" directive on Windows server. Please, double check the directive name
If it is the "Access to the server over Remote Desktop" then you are on the Windows server and the article will not work for you because it is applicable for Linux servers only
Also, you cannot change the "Login prohibited" option because you are logged as a customer and permissions to manage this option was not granted to you by Plesk administrator. If it is required to get limited access via RDP, contact Plesk administrator who can provide you with it by following steps from this article
Hi @Ivan,
the solution you mention regarding redirection is not really recommended. For safety reasons, the DocumentRoot should be set to that /public directory: https://laravel.com/docs/5.7 (Section public root). Otherwise, visitors might have access to some of the application's core directories which is not intended!
Thanks @Nikita. But does that mean Laravel can only be install in Plesk hosting through Linux?
Hi @b_p,
Thank you for the input.
Hi @Mohamad Amir bin Mohd Nasir,
It was not tested with Windows and overall using composer on Windows require RDP access to the server, see the following link: https://support.plesk.com/hc/en-us/articles/115001707605-How-to-run-Composer-with-Plesk-PHP-
Thanks @Alexandr Redikultsev. I really appreciated it
Hi Alexandr Redikultsev will you update this article accordingly to implement the recommended safety instructions? The recommendation is still up to date in the latest Laravel version (https://laravel.com/docs/7.x). The /public directory HAS TO BE the web root directory!
Hi @b_p,
This article contains information about 3rd-party component Laravel that is not supported by Plesk out of the box.
I'm moving this article from public to internal in order to not provide unsafe information to people.
Thank you.
Please sign in to leave a comment.