Skip to content

Commit 1c31cd3

Browse files
committed
Update config
1 parent c7bc31c commit 1c31cd3

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

images/web/config/production.conf

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
RewriteCond %{HTTPS} off
1414
RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
1515

16-
# Redirect to www
1716
RewriteCond %{HTTP_HOST} =SERVER_DOMAIN_PLACEHOLDER
1817
RewriteCond %{HTTP_HOST} !^www\. [NC]
1918
RewriteRule .* https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

images/web/start.sh

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,13 @@ EOF
3939
echo "" > $workdir/config/settings.local.yml
4040

4141
#### Setting up server_url and server_protocol
42+
# Remove trailing slash from SERVER_URL to prevent double slashes in generated URLs
43+
SERVER_URL_CLEAN=$(echo "$SERVER_URL" | sed 's|/$||')
4244
sed -i -e 's/^server_protocol: ".*"/server_protocol: "'$SERVER_PROTOCOL'"/g' $workdir/config/settings.yml
43-
sed -i -e 's/^server_url: ".*"/server_url: "'$SERVER_URL'"/g' $workdir/config/settings.yml
45+
sed -i -e 's/^server_url: ".*"/server_url: "'$SERVER_URL_CLEAN'"/g' $workdir/config/settings.yml
4446

4547
#### Extract domain from SERVER_URL and replace in production.conf
46-
SERVER_DOMAIN=$(echo "$SERVER_URL" | sed -e 's|^[^/]*//||' -e 's|^www\.||' -e 's|/.*$||')
48+
SERVER_DOMAIN=$(echo "$SERVER_URL_CLEAN" | sed -e 's|^[^/]*//||' -e 's|^www\.||' -e 's|/.*$||')
4749
sed -i -e "s/SERVER_DOMAIN_PLACEHOLDER/$SERVER_DOMAIN/g" /etc/apache2/sites-available/production.conf
4850

4951
### Setting up website status
@@ -142,8 +144,8 @@ setup_production() {
142144
fi
143145

144146
echo "Logging and tailing logs..."
145-
# log_and_tail /var/www/log/production.log
146-
# log_and_tail /var/www/log/jobs_work.log
147+
log_and_tail /var/www/log/production.log
148+
log_and_tail /var/www/log/jobs_work.log
147149
log_and_tail /var/log/apache2/error.log
148150
log_and_tail /var/log/apache2/access.log
149151

0 commit comments

Comments
 (0)