Last active
September 2, 2018 00:39
-
-
Save superbiche/f7c0133116cea3911a50425315f4c2fb to your computer and use it in GitHub Desktop.
Copy SSL certificate to vhost
This file contains 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
#!/bin/bash | |
## BE CAREFUL as the "web" directory is not accessible from outside in my setup, you should NEVER put your certs in a web accessible location | |
mkdir -p /var/www/.../web/ssl | |
## BE CAREFUL as the "web" directory is not accessible from outside in my setup, you should NEVER put your certs in a web accessible location | |
cp -afLr /etc/letsencrypt/live/.../privkey.pem /var/www/.../web/ssl/server.key | |
## BE CAREFUL as the "web" directory is not accessible from outside in my setup, you should NEVER put your certs in a web accessible location | |
cp -afLr /etc/letsencrypt/live/.../fullchain.pem /var/www/.../web/ssl/server.crt | |
chown -R web5:web5 /var/www/.../web/ssl | |
chmod 700 /var/www/.../web/ssl | |
chmod 400 /var/www/.../web/ssl/* |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment