0

I have been searching for days and I don't know exactly what I am looking for. Basically below is what I am trying to do:

I have 2 domains that I want to link to separate folders inside my Ubuntu server. However, one domain lets say domain1.us connects to my network and allows me to access other parts of my network. domain2.com is my own personal website that I use to test projects on. Domain2.com is going to be the main one on my server, but I want to be able to still route the domain1.us to the rest of my network.

  • What is a "domain"? What do you mean by "link to separate folders"? Are you asking about Apache2? – waltinator Aug 16 '15 at 0:55
  • I know that this is easy to do in Nginx, so it's probably easy in Apache. Which are you using? – Eric Power Aug 16 '15 at 0:57
  • I am talking about actual domains that is pointed to my outside IP address. like google.com. I am using Apache2. And by link to separate folders I mean in the /var/www/html/ would be linked to domain2.com and /var/www/html/domain1/ would be linked to domain1.us. When its pointed to my IP address for some reason none of the domains show the default apache stuff. – Harley Frank Aug 16 '15 at 1:01
0

For Apache2 you may find VirtualHosts helpful:

https://httpd.apache.org/docs/2.2/vhosts/examples.html

With Ubuntu you could navigate to /etc/apache2/sites-available and copy the available 000-default.conf to desired names (like site1.conf and site2.conf), edit those and enable them.

For more info: https://www.digitalocean.com/community/tutorials/how-to-configure-the-apache-web-server-on-an-ubuntu-or-debian-vps

  • Thank you for giving me a place to look at. I am looking at the links now. – Harley Frank Aug 16 '15 at 18:56
  • Now would you recommend using Nginx or Apache? – Harley Frank Aug 17 '15 at 0:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.