Getting Started

Learn how to deploy Auth server application to the shared hosting provider.

  • Known issues: Check the issues' section if you encounter a deployment problem. We list all the solution that fixes issues arise during deployment.
  • Deployment steps: Follow along these steps to ensure a successful deployment

Setting-up

  1. First config the .env file to the production environment.
APP_ENV=production
APP_DEBUG=false
APP_URL=https://auth.peoplenpartners.com

# Database configuration. These config might change or differ please refer to the team for verification
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306

DB_DATABASE=hkoqpsophalchey_oauth
DB_USERNAME=hkoqpsophalchey_oauth
DB_PASSWORD=RB*PJ!!5f(0UY@XJ
  1. Clear the cache configuration
php artisan optimize:clear
  1. Build the client side
No SSR
npm run build
SSR
npm run build-ssr
  1. Zip project

Zip the whole project files after a successful build of a client side.

  1. Upload to the server file
  • Firstly, log into our shared hosting provider (e.g., 1Byte, NameKh,...).
  • Locate the server folder name auth.peoplenpartners.com
  • Upload the Zip file to this location.
  • Once the upload completes successfully extract it, move all those files into to root folder of this location.
  • Add or modify the .htaccess to redirect all requests to the public folder, below is the .htaccess config
<IfModule mod_rewrite.c>
Options +FollowSymLinks
RewriteEngine On

RewriteCond %{REQUEST_URI} !^/public/ 
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f

RewriteRule ^(.*)$ /public/$1 
RewriteRule ^(/)?$ public/index.php [L] 
</IfModule>
  1. View the results

Check the site by visiting the auth.peoplenpartners.com to see if it up and running.