Laravel 8
CloudPanel v1 is obsolete
CloudPanel v1 is obsolete; check out the CloudPanel v2 Docs.
On this page, we explain step by step how to setup Laravel 8 with CloudPanel.
Installation
In the following example we will setup Laravel under the domain www.domain.com.
Preparation
Before we can start with the installation, we need to create an SSH User, a Database, and a Domain.
When you Add the Domain, make sure to select the Laravel 8 Vhost Template and the right PHP Version.
Document Root
Make sure to point the Document Root to the public directory.
Installation
To install Laravel do the following steps:
- Login via SSH to the server e.g. with john-ssh and go htdocs directory:
- Delete the project directory which has been created by CloudPanel:
- Install via composer:
- Reset permissions.
- Done! You can now open your domain in your browser to see the welcome page.
Daemons
Powered by Supervisor, daemons are used to keep long-running PHP scripts alive.
In case they will be terminated, Supervisor makes sure to restart them automatically.
Installation
Login via SSH to the server e.g. as root user.
Install supervisor
- Create a supervisor configuration file.
- Open the configuration file and put the following content:
Attention
Make sure that the php version and the user are correct to avoid permission problems.
tip
For consuming messages in parallel, e.g., when you are working with rabbitMQ, you may increase numprocs.
- Update the configuration and start the worker.
With the command supervisorctl you get information about the status, pid, and uptime.