Ensure the virtual host configuration file is present in `./apache/vhosts/` and restart the Apache container:
```
docker-compose restart apache
```
### Disabling a Project
1. Rename the virtual host configuration file in `./apache/vhosts/` to add a `.disabled` extension.
2. Restart the Apache container:
```
docker-compose restart apache
```
### Removing a Project
1. Remove the project folder from `./projects/`.
2. Remove the virtual host configuration file from `./apache/vhosts/`.
3. Remove the SSL certificate files from `./ssl/`.
4. Restart the Apache container:
```
docker-compose restart apache
```
## Switching PHP Versions
To switch PHP versions for a specific project:
1. Edit the virtual host configuration file in `./apache/vhosts/`:
```apache
<FilesMatch \.php$>
# Choose the appropriate PHP version:
# For PHP 7.4 (default):
SetHandler "proxy:fcgi://php74:9074"
# For PHP 8.1:
# SetHandler "proxy:fcgi://php81:9081"
# For PHP 8.3:
# SetHandler "proxy:fcgi://php83:9083"
# For PHP 8.4:
# SetHandler "proxy:fcgi://php84:9084"
</FilesMatch>
```
2. Restart the Apache container:
```
docker-compose restart apache
```
## Using the Build Tools Container
To access the build tools container via SSH:
```
ssh root@localhost -p 2222
```
The default password is 'password'. It's recommended to change this in a production environment.
When working with Node.js in the build tools container:
1. First, run: `source ~/.nvm/nvm.sh`
2. Then you can use Node.js and npm commands as usual.
## Using php-spy Profiler
To profile a PHP script using php-spy:
1. Connect to the appropriate PHP container:
```
docker-compose exec php74 bash # or php81, php83, php84
```
2. Run php-spy on a specific PHP process:
```
phpspy -p [PID_OF_PHP_PROCESS]
```
You can find the PID of the PHP process using `ps aux | grep php-fpm`.
## Troubleshooting
- If you encounter permission issues, ensure that your project directories and files have the correct ownership and permissions.
- If a site is not accessible, check that the virtual host configuration is correct and that the Apache container has been restarted.
- For SSL issues, verify that the SSL certificate files are correctly generated and placed in the `./ssl/` directory.
- If PHP processing is not working, ensure that the correct PHP version is specified in the virtual host configuration and that the corresponding PHP-FPM container is running.