Multiple Domain, but how manage IP access?

Posted October 23, 2018 718 views
ApacheUbuntu 16.04

I succeed create multiple domain in droplet from this tutrials :

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,

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.

Submit an Answer
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