logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: Two Domain names with a single site
Author
dprichard



Joined: 07 Jul 2015
Posts: 2
Location: Murhpy, NC

PostPosted: Tue 07 Jul '15 15:25    Post subject: Two Domain names with a single site Reply with quote

I am currently running Apache on Ubuntu 14.04. I tried adding an alias, but it doesn't do exactly what I need. I have a single site and I need to point two domain names to it. The thing is, if someone types in www.site1.com I want it to show the url as www.site1.com and if someone types in www.site2.com I want it to continue to show www.site2.com in the URL. Right now if they type in www.site1.com it shows the first site name as the URL, but if they type in www.site2.com it changes the URL to www.site1.com. Below is what I have as my virtual host in my conf file currently. Thanks for any help on this.

OS - Ubuntu 14.04
Apache/2.4.7 (Ubuntu)

Code:

ServerAdmin webmaster@localhost
ServerName site1.com
ServerAlias site1.com site2.com
Back to top
dprichard



Joined: 07 Jul 2015
Posts: 2
Location: Murhpy, NC

PostPosted: Tue 07 Jul '15 17:10    Post subject: Reply with quote

Nevermind. Figured this out. Setup a second conf file and pointed it to the same directory.
Back to top


Reply to topic   Topic: Two Domain names with a single site View previous topic :: View next topic
Post new topic   Forum Index -> Apache