Created
July 1, 2022 03:31
-
-
Save syntaqx/e00fd8f74f1db6b5652556e219ad339a to your computer and use it in GitHub Desktop.
Using envsubst for dynamic apache configurations
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
<VirtualHost *:80> | |
ServerName $APP_SERVER_NAME | |
ServerAlias www.$APP_SERVER_NAME | |
ServerAdmin [email protected] | |
DocumentRoot /var/www/ | |
</VirtualHost> |
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
export APP_SERVER_NAME="example.com" | |
envsubst < example.conf > /etc/apache2/sites-avaialble/example.conf |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment