Connecting from computers on the local network using a domain name
Posted by: chnekn (---.w86-194.abo.wanadoo.fr)
Date: April 23, 2020 09:59PM

Hello
My question is somewhat interesting than others.

I have a host running Wampserver 3, which is connected to the external network via the router and also has a domain name. For example; As an example.com, people from the external network can connect to my websites on Wampserver.

You can also connect to websites using the domain name on the host computer with Wampserver installed. However, other computers on the local network cannot connect to these websites.

In short, web sites such as example1.com and example2.com are connected from the external network, but other computers in the local network cannot connect using these domains.

Here, the problem shows the ERR_CONNECTION_RESET error in the Chrome browser, because the problem is that example1.com and example2.com domains are redirected to my network's external IP address and try to connect to those domains on their local computers.

As a result, how do I ensure that computers on the local network can connect to these websites as example1.com and example2.com. What method can be applied except for editing the HOST file on each computer?

Options: ReplyQuote
Re: Connecting from computers on the local network using a domain name
Posted by: Otomatic (Moderator)
Date: April 24, 2020 05:09PM

Hi,

> As a result, how do I ensure that computers on the local network can connect to these websites as
> example1.com and example2.com.
The PCs on the network do not have direct access* to the Internet and therefore go through the IP of the server PC to go to the Internet and back to the server PC with the same IP; this is called Local Loopback and it cannot work with Windows.
*direct meaning without going through the server PC.

Local sites should be defined as VirtualHost, with example1.com as ServerName for external access and a second VirtuaHost with example1.local as ServerName for LAN access.

And, from the LAN, you can access via 'http://IP local server/example1.local/'.

------------------------------------------------------------------------------------------------------------
Wampserver 3.2.2 32 bit - Apache 2.4.43 - PHP 7.4.7/7.3.19/..../5.6.40 - MySQL 5.7.30 - MariaDB 10.4.12
Wampserver 3.2.2 64 bit - Apache 2.4.43 - PHP 7.4.7/7.3.19/..../5.6.40 - MySQL 5.7.30/8.0.20 - MariaDB 10.4.12
PhPMyadmin 5.0.2 - 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: Connecting from computers on the local network using a domain name
Posted by: chnekn (---.w86-194.abo.wanadoo.fr)
Date: May 23, 2020 08:50PM

This problem was solved by installing the DNS server. Thanks for help.

Options: ReplyQuote


Sorry, only registered users may post in this forum.