Question

Domain name connects to Apache only with subdomain www

Hello, I have a domain name escuta.org which is configured with the name servers ns1.digitalocean.com, ns2.digitalocean.com and ns3.digitalocean.com.

Putting www.escuta.org in a browser (firefox) loads the Apache2 test page correctly, however escuta.org alone shows an “unable to connect” page. The other strange thing is that www.escuta.org is loaded as normal non-secure page, whereas escuta.org jumps to https://escuta.org in the address bar.

In the digitalocean DNS settings I have for the A and CNAME entries

CNAME www.escuta.org is an alias of escuta.org

A escuta.org directs to 157.245.6.200

CNAME mail.escuta.org is an alias mx.hover.com.cust.hostedemail.

NS escuta.org directs to ns1.digitalocean.com

NS escuta.org directs to ns2.digitalocean.com

NS escuta.org directs to ns3.digitalocean.com

Also the mail.escuta.org doesn’t redirect as it should, but it’s the “escuta.org” problem that I’m most concerned with.

Can anyone please help?

Thanks


Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

Thank you and yes, that’s exactly right. The two definitions ServerName and ServerAlias were missing from escuta.org.conf (and from that of one other virtual host). Here is the entire escuta.org.conf file:

<VirtualHost *:80>
 
        ServerAdmin nottheadmin@notthedomain.org
        DocumentRoot /var/www/escuta.org/public_html
        ServerName escuta.org
        ServerAlias www.escuta.org

        ErrorLog ${APACHE_LOG_DIR}/error-escuta.log
        CustomLog ${APACHE_LOG_DIR}/access-escuta.log combined
</VirtualHost>
 

I’m currently trying a few things to get the MX entry to work. If I can’t fix it, I’ll send another message on this thread.

All the best,

Hi @surdo,

I can see the domain escuta.org’s A record is working properly. That would mean that the issue is with the Apache virtual host file. Most probably there is one tiny misconfiguration that needs to be changed.

Can you provide us with the configuration file in order to provide further assistance in what might be reconfigured?

Regards, KFSys