Hi, I purchased a droplet and I have a domain from google (alpizano.me) and I followed these tutorials to set it up:
https://www.digitalocean.com/community/tutorials/initial-server-setup-with-ubuntu-16-04
https://www.digitalocean.com/community/tutorials/how-to-set-up-apache-virtual-hosts-on-ubuntu-16-04

I followed it to a “T” for the most part, but when I type the IP into my browser or use the domain name, alpizano.me, I get the message on Google chrome:
This site can’t be reached XXX.XX.XX.XXX took too long to respond.
Try:

Checking the connection
Checking the proxy and the firewall
Running Windows Network Diagnostics
ERRCONNECTIONTIMED_OUT

I SSH’d into root on a Linux VirtualMachine running Ubuntu on my Windows 10 PC, then I followed the guide to create an additional user, “apizano”, and and set that up with admin super privileges. I then, using GitBash on my Windows10 PC created the SSH keys for authentication. I installed apache, then created the directories structure, demo pages, and virtual hosts files (used alpizano.me). I went to google domains and added the 3 DNS name servers. I made user to add the domain on the droplet as “alpizano.me” too, instead of “www.alpizano.me”. I skipped step 6 on the “how to setup apache virtual hosts on ubuntu” because it said Optional.

Is there something I am missing out? I followed all the steps in the guide.

Also, I can’t SSH into my root on my VirtualMachine or even my Windows 10 PC using GitBash anymore. I can only SSH into the new user I created “apizano”. Is this normal? Is logging in/SSH into “apizano” and not “root” via GitBash enough to do everything I want? I followed the guide completely for that.

Thank you in advance.

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.

×
2 answers

Hello,

As far as I can see your nameservers are setup correctly. Have you tried accessing your droplet’s IP via your browser directly?

Besides that I think this is caused by one of the following things:

  • Either your domain name is not pointing to the correct droplet IP
  • Or your Apache service is not running

So to troubleshoot that you can follow these steps here:

  • First go to your DigitalOcean control panel and under droplets check if the IP of your droplet is: 159.89.85.133
  • If not, then copy the new IP and follow the steps here on how to change your DNS records: https://www.digitalocean.com/docs/networking/dns/how-to/add-domains/
  • Note: rather than adding a new A record you need to change the current one to match the correct IP of your droplet

If this is not the case and your A record is pointing to the correct IP try the following:

  • SSH to your droplet as you did earlier
  • Check if Apache is running:
systemctl status apache2
  • If Apache is not running try to start it:
systemctl start apache2
  • Wait a few seconds and then check the status again:
systemctl status apache2
  • If Apache starts as normal then try accessing your site again
  • If Apache does not start run a config test:
apachectl -t
  • You would get a list of the problems that you need to fix in case that there are any errors in your config

If you get any errors and you are not sure how to proceed, you could share them here and I’ll try to advice further.

Regards,
Bobby

Thank you so much Bobby for responding. I tried your steps, and the apache was running since July 30th and the IP was correct.

I went back to the guide and realized I must have skipped the beginning step with the firewall to allow ‘Apache’ via the command (But I did everything else, 'Doh!):

# sudo ufw allow 'Apache'

I would like to ask 1 more question about the SSH keys however - as I stated before, I can only SSH via GitBash using the secondary user I created (i.e. 'apizano’, per following the guide). And I can only do this on my Windows 10 local PC via GitBash; I initially was SSH'ing into root via my VirtualBox Virtual Machine that has Ubuntu 18.04 LTS on it.

Is there a way to be able to SSH again into my Droplet with the VirtualMachine on root? Do I need to create an SSH on the terminal on that Virtual machine? or are you allowed only 1 SSH for your droplet? I prefer to use Nano and the terminal on my Linux Virtual Machine, but the guide said to create the SSH key on your local machine (my windows 10 PC, so that’s what I did)

Thanks again for your help thus far.

Submit an Answer