How to manually install Laravel application in Plesk on Linux server?

Follow

Comments

11 comments

  • Avatar
    Mark Tierney

    This is no good for a production site as the url requires /public

  • Avatar
    Ivan Postnikov

    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.

     

     

  • Avatar
    Mark Tierney

    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.

  • Avatar
    Alexandr Redikultsev

    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.

  • Avatar
    Mark Tierney

    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 :)

  • Avatar
    Mohamad Amir bin Mohd Nasir

    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?

  • Avatar
    Nikita Nikushkin

    Hi @Mohamad!

    The "Access to the server over SSH" has no "Login prohibited" option

    It takes only the next options:

    • Forbidden
    • /bin/sh
    • /bin/bash
    • /sbin/nologin
    • /bin/tcsh
    • /bin/csh
    • /bin/bash (chrooted)
    • /bin/rbash 

    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

  • Avatar
    b_p

    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!

  • Avatar
    Mohamad Amir bin Mohd Nasir

    Thanks @Nikita. But does that mean Laravel can only be install in Plesk hosting through Linux?

  • Avatar
    Alexandr Redikultsev

    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-

  • Avatar
    Mohamad Amir bin Mohd Nasir

    Thanks @Alexandr Redikultsev. I really appreciated it

     

Please sign in to leave a comment.

Have more questions? Submit a request