I have included virtualhost .conf file into my httpd.conf with the following content:
root@phpbb3:/usr/local/etc/apache24 # cat ./sites-enabled/000-www.domain.com.conf
<VirtualHost *:*>
ServerName www.domain.com
Redirect 301 / https://discordapp.com/invite/xxxxx
</VirtualHost>
However when accessing url www.domain.com I get to forum.domain.com which I can't figure out why, I must have misconfigured something while trying to create some virtualHost configs, but now I have removed all of them except for www.domain.com and am still not able to make it redirect to discordapp.com..
root@phpbb3:/usr/local/etc/apache24 # apachectl -S
VirtualHost configuration:
*:* www.domain.com (/usr/local/etc/apache24/sites-
enabled/000-www.domain.com.conf:1)
ServerRoot: "/usr/local"
Main DocumentRoot: "/usr/local/www/apache24/data"
Main ErrorLog: "/var/log/httpd-error.log"
Mutex ssl-cache: using_defaults
Mutex default: dir="/var/run/" mechanism=default
Mutex mpm-accept: using_defaults
Mutex ssl-stapling-refresh: using_defaults
Mutex ssl-stapling: using_defaults
PidFile: "/var/run/httpd.pid"
Define: DUMP_VHOSTS
Define: DUMP_RUN_CFG
User: name="www" id=80
Group: name="www" id=80