Installing BOOKMYCAB backend on VPS, Cpanel and Plesk are same but make sure you have installed composer.
Note: we will install in main domain i.e sourcecanyon.com
Note: I am using Plesk Web Admin SE - Paths may be different in your installation.
---------------------
Step 1 - Upload code to the server.
Use FTP or Inbuild file manager and upload backend to a server in zip file i.e bmc.zip
on vps got to root folder i.e cd/var/www/html -- and unzip bmc.zip
On Panel click on bmc.zip and extract make sure files .env in root i.e public_html / httpdocs
Step 2 - Setup .env file -
It is easy to understand and setup .env file - change things accordingly like
APP_URL=https://sourcecanyon.com ( make sure you have installed SSL -
DB_DATABASE, DB_USERNAME, DB_PASSWORD ( make sure you have already created the database)
You can fill other information like Google firebase key maps keys and redis if you use redis.
Step 3 - Run commands for composer and file permission.
Note we are: /var/www/vhosts/sourcecanyon.com/httpdocs/ so our root is httpdocs & we are in root ( httpdocs) run below commands.
C1- chmod 777 -R storage/
C2- chmod 777 -R public
C3- chmod 777 -R bootstrap
C4- composer install // it will Install composer
C4- php artisan key:generate
C5- php artisan migrate --seed
C6- php artisan passport:install ( it will install passport that you have to use in your Android apps/)
C7- php artisan storage:link ( this command is very complicated it depends which server you are using and which file path /storage folder and what are permission - which operating system you are using.
I suggest you search google or StackOverflow for an answer.
This command is to link /storage in / public folder where everything uploaded and stored after
running this command check /public folder you will see a folder will link icon which means your server is working fine. and if you see a file in public. named storage you need to fix.
Configuration for this function is filesystem in config/filesystem.php -
C8- Use AMAZON S3 instead of your own server //
Before running command C7 - edit config/filesystem.php and change storage type to S3 from LOCAL
at the bottom of file uncomment and add your Amazon S3 details . and run the command C7
C8- Change permission of OAuth keys that you have generated in C6 they are used to login and signup.
permission needs to be 644 -/ this file is stored in the storage folder you have to change permissions of 2 files
chmod 600 storage/oauth-public.key
chmod 600 storage/oauth-private.key
Now your system is ready to go.