Created
August 26, 2022 01:50
-
-
Save karabasosman/a80c23b21115be5e50d18379c28aa09b to your computer and use it in GitHub Desktop.
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 | |
echo "[CUSTOM STARTUP SCRIPT] Fixing trailing slash issue by adapting Nginx configuration file" | |
replace="server {" | |
replaceWith="server { absolute_redirect off;" | |
sed -i "s/${replace}/${replaceWith}/g" /etc/nginx/sites-available/default | |
echo "[CUSTOM STARTUP SCRIPT] Reloading nginx to apply new configuration" | |
service nginx reload |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment