Report this

What is the reason for this report?

When adding subdomain it's redirecting back to main domain / Ubuntu 16.04 / Apache

Posted on December 9, 2016

Having problem with my subdomain. Did everything by tutorial and now my subdomain is redirected to main domain. I do not have much experience with this kind of stuff so help would be appreciated. And main domain has SSL so maybe that’s the problem or my hover settings for subdomain are wrong?

demo.domain.com.conf

<VirtualHost *:80>
    ServerAdmin admin@demo.domain.com
    ServerName demo.domain.com
    ServerAlias www.demo.domain.com
    DocumentRoot /var/www/demo.domain.com/public_html
    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

etc/hosts

myIPadress demo.domain.com

Hover domain

@ A myIPadress 	

*  A myIPadress 	

mail  CNAME	mail.hover.com.cust.hostedemail.com	

@ MX 10 mx.hover.com.cust.hostedemail.com	

www CNAME	domain.com	

www CNAME	demo.domain.com

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Start building today

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.