Revert "Revert "Fixing the site to run properly on server""

This reverts commit 4995611a8f02962743e4675f1e6a9151b4292137.