File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed
Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change 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]
Original file line number Diff line number Diff line change 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
You can’t perform that action at this time.
0 commit comments