I have installed Flarum on my VPS, and have set up my domain name resolution so that abc.domain.com is resolved to that VPS's IP. The result is when the browser navigates to abc.domain.com, the forum shows up. With everything else running ok, I am having this issue: each time I log out (click the Log Out link on the profile dropdown), the browser redirects to wildcard.domain.com, and Flarum stops working.
This seems to be related to my Apache VirtualHost settings. My settings are:
<VirtualHost :443>
SSLProxyEngine on
ServerAdmin admin@domain.com
ServerName wildcard.domain.com
ServerAlias .domain.com
UseCanonicalName on
It seems that the ServerName in the settings (wildcard.domain.com) is used as redirect url. My guess is that somewhere in Flarum $_SERVER['SERVER_NAME'] is returned.
How can I make it always redirect to abc.domain.com when logging out?