Hosting multple domains and test site
Posted by: Xenosis (195.215.232.---)
Date: May 09, 2017 02:14PM

Hello

I need some help expanding my wamp setup..


I got 2 websites running with my own domains, but I need a new site with domain and make a test site without a domain attached..

I've edited my host file to:

# Virtual Hosts
#

# mysite.dk:

<VirtualHost *:80>
ServerName mysite.dk
ServerAlias *.mysite.dk mysite.dk
DocumentRoot c:/wamp64/www/mysite
<Directory "c:/wamp64/www/mysite/">
Options +Indexes +FollowSymLinks +MultiViews
AllowOverride All
Require all granted
</Directory>
</VirtualHost>

# mydomain.com:

<VirtualHost *:80>
ServerName mydomain.com
ServerAlias *.mydomain mydomain
DocumentRoot c:/wamp64/www/mydomain
<Directory "c:/wamp64/www/mydomain/">
Options +Indexes +FollowSymLinks +MultiViews
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
#

It works perfectly with my wordpress installs, but if I want to add a test site without domain, how does that look like?

I tried adding this:

# localhost/vestre:

<VirtualHost *:80>
ServerName xxx.xxx.xxx.xxx(Server ip)
ServerAlias *.xxx.xxx.xxx.xxx
DocumentRoot c:/wamp64/www/vestre
<Directory "c:/wamp64/www/vestre/">
Options +Indexes +FollowSymLinks +MultiViews
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
#

This works on the server, when I go to http:://server-ip

But if I try on a remote machine I get the first website(mysite.dk) displayed

So how do i setup this, so I can access the page with example "http:://server-ip/vestre"


Last question if I need to add a new site with a domain.. The only thing I need to do is copy one of the existing vhost entries and change the domain and folder.. Nothing else is need to setup a new webpage right?


Sorry I don't remember how I manged to get this working a year ago..


Thank you..



Edited 1 time(s). Last edit at 05/09/2017 03:40PM by Xenosis.

Options: ReplyQuote
Re: Hosting multple domains and test site
Posted by: RiggsFolly (Moderator)
Date: May 10, 2017 11:21AM

Hi,

Can I suggest you look at a Dynamic DNS solution, such as NOIP.COM ( I think they still offer 1 free Dynamic DNS record.

---------------------------------------------------------------------------------------------
(Windows 7 Pro 32bit) (Wampserver 3.0.6 32bit)
<Apache 2.4.23/2.2.31> <PHP 7.1.2/7.0.16/5.6.28/5.5.38/5.4.45/5.3.29> <MySQL 5.7.10/5.6.17/5.5.28>
<MariaDB 10.1.21> <phpMyAdmin4.7.5> <MySQL Workbench 6.3.6.511>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin -- WAMPServer alternate Repo
-?-?-?- Backup your MySQL databases regularly Here is How dont regret it later! Yes even when developing -?-?-?-

Options: ReplyQuote


Sorry, only registered users may post in this forum.