Host more than one site
Posted by: bjmag94 (58.178.200.---)
Date: October 24, 2017 05:47PM

Hi, I was just wondering how I host more than one site at once through wamp?

So I want to host
[www.example.com]
and
[www.example1.com]
At the same time, how do I do this?

How do I point both sites to their different directories?
I tried this before, but it kept loading my main site for the second site just different domain name

What do I need to add/change?
Thank you

Options: ReplyQuote
Re: Host more than one site
Posted by: Otomatic (Moderator)
Date: October 24, 2017 06:35PM

Hi,

You must use VirtualHost : The need for Virtual Host

------------------------------------------------------------------------------------------------------------
Wampserver 3.1.1 32 bit - Apache 2.4.29 - PHP 7.1.12/7.0.26/5.6.32 - MySQL 5.7.20 - MariaDB 10.2.9
Wampserver 3.1.1 64 bit - Apache 2.4.29 - PHP 7.1.12/7.0.26/5.6.32 - MySQL 5.7.20 - MariaDB 10.2.9
PhPMyAdmin 4.7.5 - MysqlDumper 1.24.5
on W10 and W7 Pro 64 bit
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons
« Ce n'est pas parce qu'ils sont nombreux à avoir tort, qu'ils ont forcément raison. Coluche »
« It's not because they are many to be wrong, they are necessarily right. Coluche »

Options: ReplyQuote
Re: Host more than one site
Posted by: bjmag94 (58.178.200.---)
Date: October 25, 2017 03:16AM

Otomatic Wrote:
-------------------------------------------------------
> Hi,
>
> You must use VirtualHost :
> [url=http://forum.wampserver.com/read.php?2,127757
> ]The need for Virtual Host[/url]


I am using virtual host.

For instance I point emaple.com to C:/wamp64/www/example and then C:/wamp64/www/example1 for the second one.
And I try load the second one in my browser and it will load www.example.com files, not example1 if you get what I mean?

Options: ReplyQuote
Re: Host more than one site
Posted by: Otomatic (Moderator)
Date: October 25, 2017 09:32AM

Hi,

What is the contents of file http-vhosts.conf
Left-click Wampmanager tray icon -> Apache -> httpd-vhosts.conf

What is the contents of file C:\Windows\System32\drivers\etc\hosts

What is the result of:
Right-Click wampmanager tray icon -> Tools -> Show VirtualHost examined by Apache

------------------------------------------------------------------------------------------------------------
Wampserver 3.1.1 32 bit - Apache 2.4.29 - PHP 7.1.12/7.0.26/5.6.32 - MySQL 5.7.20 - MariaDB 10.2.9
Wampserver 3.1.1 64 bit - Apache 2.4.29 - PHP 7.1.12/7.0.26/5.6.32 - MySQL 5.7.20 - MariaDB 10.2.9
PhPMyAdmin 4.7.5 - MysqlDumper 1.24.5
on W10 and W7 Pro 64 bit
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons
« Ce n'est pas parce qu'ils sont nombreux à avoir tort, qu'ils ont forcément raison. Coluche »
« It's not because they are many to be wrong, they are necessarily right. Coluche »

Options: ReplyQuote
Re: Host more than one site
Posted by: bjmag94 (58.178.200.---)
Date: October 25, 2017 10:01AM

I worked it out, thank you, I had my main sites files all in the www folder, working fine now though, thank you.
Umm, I one more question, but it is not related to this thread do I start a new one?

Options: ReplyQuote
Re: Host more than one site
Posted by: Otomatic (Moderator)
Date: October 25, 2017 10:08AM

Hi,

> do I start a new one?
Yes.

------------------------------------------------------------------------------------------------------------
Wampserver 3.1.1 32 bit - Apache 2.4.29 - PHP 7.1.12/7.0.26/5.6.32 - MySQL 5.7.20 - MariaDB 10.2.9
Wampserver 3.1.1 64 bit - Apache 2.4.29 - PHP 7.1.12/7.0.26/5.6.32 - MySQL 5.7.20 - MariaDB 10.2.9
PhPMyAdmin 4.7.5 - MysqlDumper 1.24.5
on W10 and W7 Pro 64 bit
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons
« Ce n'est pas parce qu'ils sont nombreux à avoir tort, qu'ils ont forcément raison. Coluche »
« It's not because they are many to be wrong, they are necessarily right. Coluche »

Options: ReplyQuote


Sorry, only registered users may post in this forum.