Welcome to your HostGraber LAMP environment. Your server is pre-configured with Apache, PHP 8.2, and MySQL 8.0 running inside isolated Docker containers for maximum performance and security.

1. Retrieve Your Credentials

Your database credentials are securely stored in a file on your server. To retrieve your MySQL root password, run the following command:

Bash
 
cat /root/confidential.txt

Save this password in a secure location, as you will need it to manage your database.


2. Managing Your Services

Because your software runs inside Docker, you do not need to install Apache or MySQL on the host system. Running standard commands like apache2 -v on the host will return "command not found."

Instead, use docker commands to interact with your services.

How to use your services:

  • Web Files: Your web content is located in the mapped directory on your host (typically /var/www/html or similar). Upload your PHP files there to see them on your website.

  • MySQL Access: To log into your database, use the following command:

    Bash
     
    docker exec -it lamp-db-1 mysql -u root -p
    

    (Enter the password you retrieved from confidential.txt when prompted).


3. Essential Docker Commands

Keep these commands handy to monitor and manage your environment:

Task Command
Check service status docker ps
View logs (Apache/PHP) docker logs lamp-php-apache-1
View logs (MySQL) docker logs lamp-db-1
Restart your web server docker restart lamp-php-apache-1
Restart your database docker restart lamp-db-1

4. Troubleshooting

If your website is not loading:

  1. Verify Containers: Run docker ps. Ensure the STATUS column says "Up" for both lamp-php-apache-1 and lamp-db-1.

  2. Check Logs: If a container is restarting or down, check the logs (see table above) to see if there is a configuration error or database connection issue.

  3. Firewall: Ensure port 80 is open on your server firewall.

  4. Browser Cache: If you updated your files but don't see changes, clear your browser cache or try an Incognito/Private window.


Need Help?

If you are having trouble connecting your PHP application to the database or need help migrating your files, we are here to assist.

Open a Support Ticket at HostGraber | View System Status


Pro-Tip: Because your server uses Docker, you can easily backup your entire environment by backing up your project data folders. If you break something, you can simply restart the containers to restore them to their original state!

Was this answer helpful? 0 Users Found This Useful (0 Votes)