AWS Apache, PHP and Mysql

 A web server environment, installing Apache, PHP, MySQL, and configuring various settings and files for a specific application (lms01072024). Here's a simplified rundown of what you've done:

1. Setup Apache and PHP:

   - Installed Apache web server (`sudo apt install apache2`).

   - Installed PHP 8.0 and required modules (`sudo apt install php8.0 php8.0-mysqli`).

   - Enabled Apache and PHP modules (`sudo systemctl enable apache2`).

sudo mysql -u root -p lmsdb < /var/www/web/lms01072024/db/capstone.sql

2. Database Setup:

   - Installed MySQL server (`sudo apt install mysql-server`).

   - Secured MySQL installation (`sudo mysql_secure_installation`).

   - Created a MySQL user and imported a database (`mysql -u root -p lmsdb < /var/www/web/lms01072024/db/capstone.sql`).

   - php -m

3. Web Application Setup:

   - Cloned a Git repository (`git clone`).

   - Modified configuration files, likely for Apache (`sudo nano /etc/apache2/sites-available/yoursite.conf`).

4. Maintenance and Troubleshooting:

   - Restarted or reloaded Apache (`systemctl reload apache2` or `systemctl restart apache2`).

   - Checked Apache error logs (`sudo tail -n 20 /var/log/apache2/error.log`).

   - Cleared Apache error  (sudo truncate -s 0 /var/log/apache2/error.log)


5. Additional Configurations:

   - Created PHP information file (`sudo printf "<?php\nphpinfo();\n?>" > /var/www/web/lms01072024/phpinfo.php`).

 systemctl restart apache2

 systemctl reload apache2

This series of commands and actions essentially outlines the process of setting up a web server environment with Apache, PHP, and MySQL, co

nfiguring it for a specific web application, and performing maintenance and troubleshooting tasks along the way.

Post a Comment