Multiple Domain, but how manage IP access?

October 23, 2018 367 views
Ubuntu 16.04 Apache

I succeed create multiple domain in droplet from this tutrials :
https://www.digitalocean.com/community/tutorials/how-to-set-up-apache-virtual-hosts-on-ubuntu-16-04

When i access my ip droplet from browser, it access one of domain i created, but not what i want,
But how to manage to load domain i want, when i access my ip from my browser?

Sorry for my bad English, i hope u understand,
I have no experience in server, use a lot tutorials from this community,

2 Answers

When you visit the IP, Apache shows you the domain that’s in the first virtual host in httpd.conf. So if you want to view a particular domain via IP, move its virtual host up top so it’s first in the list.

you can :

  1. Edit 000-default.conf, in document root change it to document root of the domain you want.
  2. Rename your virtualhost configuration file of domain you want to be default with 0000-test.conf
Have another answer? Share your knowledge.