This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Run mkdir /etc/supervisor/ to create a directory to save configuration files. | |
Go to the newly created directory and run touch laravel-worker.conf (This creates a config file called laravel-worker, you can change this to another name of your choosing). | |
Once the laravel-worker.conf file is created. Edit its content (use sudo vim laravel-worker.conf) and enter the configuration as shown below: | |
[program:laravel-worker] | |
process_name=%(program_name)s_%(process_num)02d | |
command=php /*Location to your laravel project*/artisan queue:work --tries=3 | |
autostart=true | |
autorestart=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Make sure you write the following in the htaccess file of the laravel application | |
<Files .env> | |
order allow,deny | |
Deny from all | |
</Files> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## yum install supervisor | |
The above command gave an error at first, the error is found below: | |
====================================================================================== | |
- Loaded plugins: fastestmirror, universal-hooks | |
- Loading mirror speeds from cached hostfile | |
* EA4: 104.219.172.10 | |
* cpanel-addons-production-feed: 104.219.172.10 | |
* cpanel-plugins: 104.219.172.10 | |
* base: mirrors.sonic.net |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Http\Controllers; | |
use Illuminate\Http\Request; | |
use App\Http\Controllers\Controller; | |
use GuzzleHttp\Client; | |
class GuzzleController extends Controller | |
{ |