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 10 Pro 64bit) (Wampserver 3.3.4 64bit) Aestan Tray Menu 3.2.5.4
<Apache versions MULTIPE> <PHP versions MULTIPLE> <MySQL Versions MULTIPLE>
<MariaDB versions MULTIPLE> <phpMyAdmin versions MULTIPLE> <MySQL Workbench 8.0.23>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin
Get your Apache/MySQL/mariaDB/PHP ADDONs here from the WAMPServer alternate Repo
-X-X-X- Backup your databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-

Options: ReplyQuote


Sorry, only registered users may post in this forum.