Skip to content

Commit

Permalink
Update website.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
xdayeh authored Oct 9, 2024
1 parent d8e9a8e commit 89b9a36
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions website.sh
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,12 @@ sudo a2ensite "$WEBSITE.conf" || error_exit "Failed to enable site $WEBSITE."
# Test the Apache configuration before reloading
check_apache_config

# Reload Apache only if configuration is valid
sudo systemctl reload apache2 || error_exit "Failed to reload Apache."
# Restart Apache only if configuration is valid
sudo systemctl restart apache2 || error_exit "Failed to restart Apache."

# Enable the rewrite module and restart Apache
sudo a2enmod rewrite || error_exit "Failed to enable rewrite module."
sudo systemctl restart apache2 || error_exit "Failed to restart Apache."
sudo systemctl reload apache2 || error_exit "Failed to reload Apache."

# Update /etc/hosts
if ! grep -q "$HOST_ENTRY" /etc/hosts; then
Expand Down

0 comments on commit 89b9a36

Please sign in to comment.