1

Good morning, I have 2 servers (#1 and #2) My domain name is pointed to #1 and there in the DNS zone I pointed the "A record" to #2 IP address, (with this setup I can have mails on #1 and website on #2). I know it's easier to make it the other way around but #2 is 100% configured by hand (#1 has cpanel) and I want to avoid potential DNS and mail issues.

The #2 is running Apache2 and I have virtual hosts configured there, however my domain name loads /var/www content (apache default) and not /home/myuser/www/ which is the patch specified as DocumentRoot. I know virtual hosts are properly configured because previously I had the domain name pointed to #2 and they worked well.

What I am missing here guys?

apache2.conf: http://pastebin.com/52WB7LUw

8
  • Can you share your apache config? Its difficult to say what's wrong without it
    – heavyd
    Jul 28, 2015 at 14:30
  • I just added virtual host config
    – Jay
    Jul 28, 2015 at 15:00
  • When you say your domain name points to #1, do you have an A record that points to the IP address of #1, so that external systems looking up your domain name, e.g., example.com, are pointed to the IP address of #1? It is somewhat confusing when you state you are using an A record to point to #2 immediately after saying your domain name resolves to #1. Do you have something like www.example.com pointing to #2 by the other entry in your zone file? Why didn't you use an Mx record for email?
    – moonpoint
    Jul 28, 2015 at 15:41
  • @moonpoint hi, yes, domain resolves to #1 and there the A record points to #2 ip address, I do it that way because as I said, #1 has a reliable DNS configuration and #2 doesn't. This is not a situation where I can simply modify the MX record, note what I want to "forward" is website not emails.
    – Jay
    Jul 28, 2015 at 15:46
  • What I'm trying to understand is how it resolves to #1, if the A record in the zone file for the domain has the IP address for #2. If I performed an nslookup. e.g., nslookup example.com, would I get the IP address of #1 or #2? Are you stating #1 is a DNS server that is authoritative for your domain? Is the problem you are having now that people can reach your site on #2, but are getting the wrong content?
    – moonpoint
    Jul 28, 2015 at 15:56

0

You must log in to answer this question.

Browse other questions tagged .