How can i connect to a Virtual Server from external IP?
Posted by: Occhioverde (---.cust.vodafonedsl.it)
Date: September 17, 2017 08:18PM

Good morning.
I created a Virtual Host with WAMPServer 3 (Call it "site2"winking smiley.
Obviously, if I want to connect to this site with my PC, just enter "[site2"]; in the address bar, but if I try to connect from another computer with the external address, I can only connect to the main host (localhost).
How can I connect to "site2" via external IP?
Thanks in advance for the help.

Options: ReplyQuote
Re: How can i connect to a Virtual Server from external IP?
Posted by: RiggsFolly (Moderator)
Date: September 18, 2017 10:09AM

Hi,

Because Apache finds you Virutal Host by matching the domain name used in the url to the ServerName you have to call it as `site2` from the other PC's

Now of course the problem is that the other PC's dont know anything about `site2`

So to get round this you can change the HOSTS file on the PC's that want to be able to use `site2` to point to the PC running WAMPServer (Apache). So assuming WAMPServer is running on 192.168.1.10 you can add this ti the HOSTS file of each of the other PC's


192.168.1.10  site2

Alternatively, but this is a lot more omplicated, you could install a DNS Server and make all your PC's use that DNS Server and add site2 to your DNS. Dont try this unless you know what you are doing with DNS!

---------------------------------------------------------------------------------------------
(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.