Ok I solved this. Turns out it was apache and PHP config issues. First when the server was built out and PHP installed somehow the curl module did not get installed. Second apache2.conf had “AllowOverride None” for the web directory which broke permalinks and made all the links weird. Somehow they still worked manually though.