I decided to install a new server and use ronivay's script from github to install and later update XOCE. It is working well for me and I'm not going to work on fixing the other server now.