Last active
June 7, 2021 01:20
-
-
Save daubac402/dadad4fda70c17a9b90f4de7b99e04e9 to your computer and use it in GitHub Desktop.
Add SSL to laradock apache2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
0. Do this step 1 time only | |
vim /your_laradock_location/apache2/Dockerfile, add these line before the "COPY vhost.conf /etc/apache2/sites-enabled/vhost.conf" line and "ENTRYPOINT" line: | |
RUN mkdir /etc/apache2/ssl/ | |
COPY ssl /etc/apache2/ssl/ | |
---- | |
1. Prepare your cert, key, ca files for your site at: /your_laradock_location/apache2/ssl/your_site/your_files | |
2. In your config file at host: /your_laradock_location/apache2/sites/your_site.conf, add to "<VirtualHost *:443>": | |
SSLCertificateFile /etc/apache2/ssl/your_site/your_crt.crt | |
SSLCertificateKeyFile /etc/apache2/ssl/your_site/your_key.key | |
SSLCertificateChainFile /etc/apache2/ssl/your_site/your_ca.ca | |
3. Rebuild apache2 image (run at your_laradock_location) | |
docker-compose build --no-cache apache2 | |
5. docker-compose up -d apache2 mysql phpmyadmin workspace | |
or simply just apache2: docker-compose up -d apache2 | |
---------------------------------------------------------- | |
Cheats sheet (run at your_laradock_location): | |
Restart apache2: docker-compose restart apache2 | |
SSH to apache2: docker-compose exec apache2 bash | |
View apache2 logs: docker-compose logs -f apache2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment