The git repository https://tsergeant@bitbucket.org/tsergeant/sayit.git
contains a working Laravel application called “SayIt!”. You should create a
virtual host named sayit.yourdomain that maps to
/var/www/live/sayit.yourdomain. You
will have performed some of the steps below as part of the prelab assignment.
Some steps you'll need to take:
- Update DNS to point the subdomain to your server.
- Clone the git repository to the appropriate directory and set permissions
of various files/directories as need for a Laravel application.
- In the cloned and renamed repository run the command: composer update
(which will download and create all the needed vendor files and packages).
- Create logs directory with appropriate permissions.
- Create an appropriate .conf file.
- Use cerbot to install an SSL certificate and create redirect code to push
all traffic to https.
- Setup a MySQL database and database user for the application.
- Create tables by executing the appropriate commands found in
database/sql/tables.sql:
mysql sayit_db -u root -p < tables.sql
.
Copy .env.example file in Laravel to .env and then edit it as
follows:
- Specify app name and url.
- From the command-line execute php artisan key:generate to
create a random key.
- Set app environment to “staging”
- Specify database info.
- Comment out redis, mail, aws, and pusher statements.
- Use a combination of errors messages, apache log files, and Laravel
log files to debug any issues.
- NOTE: Once the application is working you should be able to type
a topic (in the second box) and then enter a message. When you click
“Say It!” it should show the message in the “What's Been Said ...”
section.
Establish the new, working Laravel application as a work environment for
all users who are part of the webdev group. Some steps:
- Create a group called webdev that has access to the directory.
All files should have webdev as group and new files in those folders
should use that group. (logs folder and other folders that need
apache write access are exceptions)
- Create a user webdude and add that user to webdev. Add
your personal account to webdev too.
- Verify that Laravel logs and apache logs are writing successfully.