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: Setting Up Two Domain Names to use the Same IP Address
Author
daveg



Joined: 21 Oct 2016
Posts: 5
Location: London

PostPosted: Fri 13 Jan '17 12:02    Post subject: Setting Up Two Domain Names to use the Same IP Address Reply with quote

Hi,

I have two domain names with a domain name company. I want both to point to the same IP address (my laptop running Apache Web Server) but point to a different folder so correct content can be served for each site e.g

http://jjj-golf-clubs.com

http://hhh-gardening-tips.com

Currently the A records with the domain name company for both point to the same IP address (my laptop). The support guy I spoke to said I can setup the desired folder redirection at my end by adding code to an apache config file on the laptop.

Can anyone advise me what edits I need to make?

Thankyou in advance !
Back to top
mraddi



Joined: 27 Jun 2016
Posts: 149
Location: Schömberg, Baden-Württemberg, Germany

PostPosted: Sun 15 Jan '17 22:25    Post subject: Reply with quote

please check the conf/extra/httpd-vhosts.conf which is included in the apache-for-windows-downloads you can get from here - it also has to be included in the conf/httpd.conf with the following line:
Code:
Include conf/extra/httpd-vhosts.conf


I think this is what you are searching for:?:

The above example is for http (unencrypted). If you want to use https you either need
a) a certificate/key with a subject-alternate-name or
b) run both virtual webservers on different ports or
c) use SNI (see https://wiki.apache.org/httpd/NameBasedSSLVHostsWithSNI).
I've never used SNI so I cannot help with this, but the other both versions are easy to do.
Back to top


Reply to topic   Topic: Setting Up Two Domain Names to use the Same IP Address View previous topic :: View next topic
Post new topic   Forum Index -> Apache