Virtual host issue
Posted by: dijsill (---.autosales.com.mt)
Date: November 23, 2023 11:34AM

I have wamp installed in my windows server and have 2 projects and created 2 virtual hosts:

link 1 is pointing to project1in virtual host confuration (xxx.domain.com)
link2 is pointing to project2 in virtual host confuration (yyy.domain.com)

On my dns server I have both xxx.domain.com and yyy.domain.com pointing to the server ip address

Both virtual hosts were created using the webinterface of wamp (localhost).

however for some reason all of a sudden link1 and link2 are pointing to project1.
Tried from several computers and even from the server itself and also used different browsers including incognito but still.

I am not sure if a supplier that has access to the server did anything as he is not responding.

Any ideas what I can check?

I already restarted server
deleted virtual hosts from webinterface and recreated them
clear dns just in case from firewall
restart dns from wamp



Edited 1 time(s). Last edit at 11/23/2023 11:34AM by dijsill.

Options: ReplyQuote
Re: Virtual host issue
Posted by: Otomatic (Moderator)
Date: November 23, 2023 12:30PM

Empty browser cache.

---------------------------------------------------------------
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons

Options: ReplyQuote
Re: Virtual host issue
Posted by: dijsill (---.autosales.com.mt)
Date: November 23, 2023 12:40PM

already tried that

Options: ReplyQuote
Re: Virtual host issue
Posted by: Otomatic (Moderator)
Date: November 23, 2023 01:45PM

What is the result of :
- Right-Click -> Tools -> Apache tools -> Display VirtualHosts examined by Apache

If, when you ask for 'http://xxx.domain.com/' or 'http://yyy.domain.com/', your DNS server returns 'http://my_ip_address/' without any further specification, it's absolutely normal for it to point to VirtualHost 1 in both cases, since it's the default VirtualHost.

---------------------------------------------------------------
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons

Options: ReplyQuote
Re: Virtual host issue
Posted by: dijsill (---.autosales.com.mt)
Date: November 23, 2023 02:05PM

VirtualHost configuration:

Default server: localhost
On port 443 Virtual Host: cloud.domain.com
Virtual Host: localhost
Virtual Host: project. domain.com
Virtual Host: cloud.domain.com

--- Do you want to copy the results into Clipboard?
--- Press the Y key to confirm - Press ENTER to continue...

what do you mean by the second part? when I ping both addresses I get same reply ip since they are both on the same server.

Options: ReplyQuote
Re: Virtual host issue
Posted by: Otomatic (Moderator)
Date: November 23, 2023 03:02PM

> Virtual Host: project. domain.com
A space is not allowed in a ServerName!

When you connect locally, you have two different calls: 'http://project.domain.com/' and 'http://cloud.domain.com/'.

If the DNS server only returns 'http://my_ip_address/' in both cases, how can the local DNS know which ServerName to go to?

The DNS server should return either 'http://my_ip_address/project.domain.com' or 'http://my_ip_address/cloud.domain.com/'.

---------------------------------------------------------------
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons

Options: ReplyQuote


Sorry, only registered users may post in this forum.