Commit 9ddcd2bf authored by Shengjie Yang's avatar Shengjie Yang
Browse files


parent d79e1679
# Setup Laravel App on Server
* Laravel app was developed on local and pushed to Git. We were going to deploy it on an Ubuntu 18.04 server where PHP, Apache, MySQL are already setup.
......@@ -14,7 +13,7 @@ git clone dat
cd datamanager/
cp .env.example .env
// Create a new database in MySQL and config the mysql parameter in .env
// Create a new database in MySQL and configure the mysql parameters in .env
### 2. Install Composer
......@@ -68,7 +67,7 @@ In my case, it returns errors in prompt
> \- Root composer.json requires laravel/framework ^8.40 -> satisfiable by laravel/framework[v8.40.0, ..., 8.x-dev].
**Solution:** Upgrade PHP to 7.4 (Whatever version php>=7.3)
**Solution:** Upgrade PHP from 7.2 to 7.4 (Whatever version php>=7.3)
sudo add-apt-repository ppa:ondrej/php
......@@ -99,6 +98,8 @@ Then rerun `composer update` / `composer install` under Laravel app directory.
### 4. Setup Virtual Host in Apache2
Since DocumentRoot doesn't point to /var/www/html and port 80 is occupied, I setup another directory and specify port 8080 for deploying my sites.
sudo mv /etc/apache2/sites-available/000-default.conf /etc/apache2/sites-available/
......@@ -132,6 +133,8 @@ sudo a2ensite
vi /etc/apache2/ports.conf
// Add a line: Listen 8080
sudo service apache2 restart
### 5. Initial Laravel App
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment