Access WAMP Server from another machine by hostname
Posted by: Simone (---.une.net.co)
Date: August 18, 2016 03:58PM

I am trying to figure out if this is even possible...

Here is what I have: 2 machines with host name computer1 and computer2 connected on an home wifi network I do not have access to the wifi router configuration, I assume it has some sort of DHCP which assign the ip address dynamically.

On computer1 I have installed Wamp 3 and I have a test static website (and a worpress website) with related virtual hosts.

On computer1 I can easily view the websites in this way:

1) ht_tp://localhost or ht_tp://computer1 or ht_tp://192.168.1.2 --Wamp home page
2) ht_tp://localhost/staticWebsite or ht_tp://computer1/staticWebsite or ht_tp://192.168.1.2/staticWebsite or even ht_tp://staticWebsite --Static website
3) ht_tp://localhost/wpWebsite or ht_tp://computer1/wpWebsite or ht_tp://192.168.1.2/wpWebsite or even ht_tp://wpWebsite --Wordpress website

From the other machine I can correctly view them in this way:

1) ht_tp://192.168.1.2 --Wamp home page
2) ht_tp://192.168.1.2/staticWebsite --Static website
3) ht_tp://192.168.1.2/wpWebsite --Wordpress website

As the ip addess are dynamic I would love to be able, from computer2 to use the hostname, for example: ht_tp://computer1/staticWebsite... Modifing the hosts file wont help as they are dynamic...

I assume computer2 somehow resolve computer1 name because if I do \\computer1\ I can browse shared drives and folders...

Is it possible to access Wamp (Apache) server from another machine using host name?

Thanks, Simone

Options: ReplyQuote
Re: Access WAMP Server from another machine by hostname
Posted by: RiggsFolly (Moderator)
Date: August 18, 2016 04:31PM

Just set the PC running WAMPServer as a static IP Address

[portforward.com]


As long as you pick one that is unlikely to be assigned by the DHCP server you will probably get away with it

---------------------------------------------------------------------------------------------
(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
Re: Access WAMP Server from another machine by hostname
Posted by: Simone (---.une.net.co)
Date: August 18, 2016 04:50PM

Well yes... I do not have many PCs connected so if I set a high IP I should get away with this...

still I will probably habe to edit the hosts file...

Is this the only way?

I know it is probalby not related to wamp but does anyone know why the name is not resolved automatically?

Options: ReplyQuote
Re: Access WAMP Server from another machine by hostname
Posted by: RiggsFolly (Moderator)
Date: August 18, 2016 05:29PM

See the last few posts on this thread [forum.wampserver.com]

---------------------------------------------------------------------------------------------
(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
Re: Access WAMP Server from another machine by hostname
Posted by: Simone (---.une.net.co)
Date: August 18, 2016 05:47PM

I do not see how is that related... sorry.

I know how to edit the hosts file and it would solve the problem (well probably it will not solve it if I want to connect for a phone but anyway...)

Just I am still wondering if there is another way.

Options: ReplyQuote
Re: Access WAMP Server from another machine by hostname
Posted by: Otomatic (Moderator)
Date: August 18, 2016 06:00PM

Hi,

> know why the name is not resolved automatically?

"Automatically" assume that there is somewhere a thing, a gadget, a device, which gives the correspondence between the name and the IP address. And this thing, it's called a DNS, Domain Name Server.

The hosts file on each machine, IS a DNS.

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

Options: ReplyQuote
Re: Access WAMP Server from another machine by hostname
Posted by: Simone (---.une.net.co)
Date: August 18, 2016 06:11PM

> The hosts file on each machine, IS a DNS.

Corrct, if I type \\computer1\, it is resolved and I see the files on computer 1... so I was expecting that typeing ht_tp://computer1/ I was going to see the server...

But I am far to be an expert and maybe I was just expecting something wrong smiling smiley



Edited 1 time(s). Last edit at 08/18/2016 06:12PM by Simone.

Options: ReplyQuote
Re: Access WAMP Server from another machine by hostname
Posted by: Otomatic (Moderator)
Date: August 18, 2016 06:23PM

Hi,

> Corrct, if I type \\computer1\, it is resolved and I see the files on computer 1...
> so I was expecting that typeing ht_tp://computer1/ I was going to see the server...

These are two completely different things.
The first is managed by the file manager of the operating system of the machine.
The second is part of another protocol and absolutely can not be managed in the same way.

In the same way that sends and receive emails as part of another protocol and are not managed as 'http'.

And in this "explanation," I simplified a lot by not speaking different layers of the same protocol.

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

Options: ReplyQuote
Re: Access WAMP Server from another machine by hostname
Posted by: Simone (---.une.net.co)
Date: August 18, 2016 06:35PM

Many thanks, simple and clear exlanation.

Simone

Options: ReplyQuote


Sorry, only registered users may post in this forum.