0

Newbie/wannabe/failing webmaster here...I have a Google VM Debian9 instance running Apache2. For the past few months, i had no domain name, so i faked one using a virtual host (crm.fake_example.com) since i was the only user. I added the IP and my fake address to my local hosts file, and everything worked just fine as I stood up a web-based, open source software application on the VM.

I've now pointed a subdomain (crm.real_example.com) to the IP address of my VM. I've waited a full week for DNS propogation (yes, overkill) and have used MXtoolbox - DNSLookup to verify that the subdomain resolves to the correct IP address. I erased any previous entries to my local hosts file.

Visiting the site from my local machine (or any machine) yields the same error ("ERR_NAME_NOT_RESOLVED").

However, if I edit my local hosts file to include the IP and crm.real_example.com...it works just fine again.

I feel like MXtoolbox proves to me that DNS is working, so the problem must exist on my VM somewhere (can someone verify this thinking?) - but I've checked/re-checked all of the following...

On the Google VM apache2 server:

  • /etc/hosts is a clean file (nothing from crm.fake_example.com exists in there any longer)
  • /etc/apache/sites-available/mysite.conf has the necessary virtual host info (see below)
  • note: I know virtual host is not required for only one site...but i plan to add more so want it working using this
  • /etc/apache/sites-enabled/mysite.conf activated via a2ensite
  • config.inc.php (a vtigercrm-specific config file) has been reconfigured for crm.real_example.com
<VirtualHost *:80>
     ServerAdmin me@real_example.com
     ServerName crm.real_example.com
     DocumentRoot /var/www/html/crm/
     <Directory /var/www/html/crm/>
        Options FollowSymlinks
        AllowOverride All
        Require all granted
     </Directory>
     ErrorLog /var/log/apache2/crm_error.log
     CustomLog /var/log/apache2/crm_access.log combined
</VirtualHost> 

I could also list all the things i've done on my local machine like clearing DNScache, cleaning up my hosts file, etc...but the same thing happens from any other machine with no previous successful attempts at hitting this server.

After a full week of looking at the same things over and over...any guidance is appreciated!

  • are the requests reaching the server? Can you check the access and error logs for apache and see if they are reaching there. also, please check that you have restarted the apache service after the configuration (i know its a very minor detail but we have all missed this sometime). let us know your findings. – pinaki Nov 19 '19 at 01:18
  • Requests do not appear to be reaching the server (assuming I'm looking in the right place). For example, i try to hit the site via my browser and there is no additional entry in the access log. I update my hosts file and then successfully hit the site via my browser and then clearly see a new entry in the access log. The error log remains empty in both situations. Second - yes, apache service restarted many times :) thx! – Mark von Oven Nov 19 '19 at 18:58
  • Ok, so we know that the subdomain isnt resolving - unless you are looking at the wrong log files (it happens). can you try removing the subdomain and see if it reaches the logs? – pinaki Nov 19 '19 at 21:08
  • also, what happens if you try to access the real_example.com directly right now. does it work and reach the logs? – pinaki Nov 19 '19 at 21:09

0 Answers0