I have an instance on forum.intranet.company.com.br (5 level domain) that works fine.
With SSO enabled too.
Can you try to peek at /var/discourse/shared/standalone/rails/production.log at the one boxing time?
Remember to use a new url, since discourse caches results, and there will be a stack trace there.