Last active
February 12, 2024 05:52
-
-
Save jack2jm/4222ff6cb3f9d5688ebaccad45a39eb7 to your computer and use it in GitHub Desktop.
Laravel - New Project Setup to server
This file contains hidden or 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
| Clone project | |
| git clone https://[email protected]/username/project_name | |
| 2. run command | |
| composer install | |
| 3. create .htaacess file and pase below code. | |
| 4. create .env file and paste below code. | |
| ================= .env file example ================================ | |
| APP_NAME="Project Name" | |
| APP_ENV=local | |
| APP_KEY=base64:dXMN/ka7d4+AKLnfvdV9l3kaOSn2LJbtRHgLNDQdg8c= | |
| APP_DEBUG=true | |
| APP_URL=http://localhost | |
| LOG_CHANNEL=stack | |
| DB_CONNECTION=mysql | |
| DB_HOST=127.0.0.1 | |
| DB_PORT=3306 | |
| DB_DATABASE=database_name | |
| DB_USERNAME=root | |
| DB_PASSWORD= | |
| BROADCAST_DRIVER=log | |
| CACHE_DRIVER=file | |
| SESSION_DRIVER=file | |
| SESSION_LIFETIME=120 | |
| QUEUE_DRIVER=sync | |
| REDIS_HOST=127.0.0.1 | |
| REDIS_PASSWORD=null | |
| REDIS_PORT=6379 | |
| MAIL_DRIVER=smtp | |
| MAIL_HOST=smtp.mailtrap.io | |
| MAIL_PORT=2525 | |
| MAIL_USERNAME=null | |
| MAIL_PASSWORD=null | |
| MAIL_ENCRYPTION=null | |
| PUSHER_APP_ID= | |
| PUSHER_APP_KEY= | |
| PUSHER_APP_SECRET= | |
| PUSHER_APP_CLUSTER=mt1 | |
| MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}" | |
| MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}" | |
| URL_PREFIX="/folder_name/" | |
| =========================== .htaaccess ======================================= | |
| <IfModule mod_rewrite.c> | |
| <IfModule mod_negotiation.c> | |
| Options -MultiViews -Indexes | |
| </IfModule> | |
| RewriteEngine On | |
| # Handle Authorization Header | |
| RewriteCond %{HTTP:Authorization} . | |
| RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] | |
| RewriteCond %{REQUEST_FILENAME} -d [OR] | |
| RewriteCond %{REQUEST_FILENAME} -f | |
| RewriteRule ^ ^$1 [N] | |
| RewriteCond %{REQUEST_URI} (\.\w+$) [NC] | |
| RewriteRule ^(.*)$ public/$1 | |
| RewriteCond %{REQUEST_FILENAME} !-d | |
| RewriteCond %{REQUEST_FILENAME} !-f | |
| RewriteRule ^ server.php | |
| </IfModule> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment