Pages: 12Next
Current Page: 1 of 2
WAMP 3 - Access from LAN
Posted by: geabenitez (179.51.9.---)
Date: June 28, 2016 04:16PM

Good day, I have Windows Server 2012 R2, I installed WAMP Server 3, on wamp settings I enabled the following
- Virtual host sub-menu
- Menu item: Online/Offline

when installing wamp a "my-site" folder was created, i created a index.html file in there with a <h1>

then i created a vhost using the GUI (localhost)

and the httpd-vhosts.conf looks like this

<VirtualHost *:80>
ServerName my-site.dev
DocumentRoot c:/wamp64/www/my-site
<Directory "c:/wamp64/www/my-site/">
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Require local
</Directory>
</VirtualHost>

after this, i clicked on Put Online and disabled my windows firewall

from a different computer on the network i am trying to access to (http://29.8.14.2/my-site.dev) (IP of the windows server / folder) but i get the message


"Forbidden
You don't have permission to access /my-site.dev on this server.
Apache/2.4.17 (Win64) PHP/5.6.16 Server at 29.8.14.2 Port 80"

could you please let me know what I am doing incorrectly?

thank you.

Options: ReplyQuote
Re: WAMP 3 - Access from LAN
Posted by: RiggsFolly (Moderator)
Date: June 28, 2016 05:35PM

The "Put Online/Offline" menu is redundant when using Virtual Hosts. Each Virtual Host is protected by its own security

In your example :-

<VirtualHost *:80>
    ServerName my-site.dev
    DocumentRoot c:/wamp64/www/my-site
    <Directory "c:/wamp64/www/my-site/">
        Options Indexes FollowSymLinks MultiViews
        AllowOverride All
        Require local                                                       <- THIS LINE
    </Directory>
</VirtualHost>

So if you want this Virtual Host to be visible to another PC in your network

<VirtualHost *:80>
    ServerName my-site.dev
    DocumentRoot c:/wamp64/www/my-site
    <Directory "c:/wamp64/www/my-site/">
        Options Indexes FollowSymLinks MultiViews
        AllowOverride All
        
        Require local
        Require 192.168.1                                        <- To allow a whole subnet access
    </Directory>
</VirtualHost>


or to the universe
<VirtualHost *:80>
    ServerName my-site.dev
    DocumentRoot c:/wamp64/www/my-site
    <Directory "c:/wamp64/www/my-site/">
        Options Indexes FollowSymLinks MultiViews
        AllowOverride All
        
        Require all granted                        <-- Allow access from anywhere

    </Directory>
</VirtualHost>

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



Edited 1 time(s). Last edit at 06/28/2016 05:35PM by RiggsFolly.

Options: ReplyQuote
Re: WAMP 3 - Access from LAN
Posted by: geabenitez (179.51.9.---)
Date: June 28, 2016 06:02PM

Thank you very much for your response,

I tried using the first configuration (subnet access), then i restarted the services but apache does not start

then i tried using the second opcion (all granted), and when restarting the services both of them (apache and mysql) started correctly but i am still not able to connect from a different PC.

I tried using both scenarios (Server Online and Offline)

is there something im missing here?

thank you

Options: ReplyQuote
Re: WAMP 3 - Access from LAN
Posted by: Otomatic (Moderator)
Date: June 28, 2016 06:27PM

Hi,

You try to access from other PC on the network by:
> 'http://29.8.14.2/my-site.dev'
29.8.14.2 is a public IP (WAN ip). You cannot connect from local network devices on your local server with the use of a public IP ; this is called "local loopback" and can only be done with very specific drivers.

You must use the private IP (LAN ip) of the local server.

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

Options: ReplyQuote
Re: WAMP 3 - Access from LAN
Posted by: geabenitez (179.51.9.---)
Date: June 28, 2016 09:42PM

Thank you for your answer, No, it is a LAN Ip, we've changed the ip structure to 29.8.14, so the server (windows 2012) is 29.8.14.2, gateway 29.8.14.1 and my pc ip is 29.8.14.100

Options: ReplyQuote
Re: WAMP 3 - Access from LAN
Posted by: Otomatic (Moderator)
Date: June 28, 2016 09:49PM

Hi,

Try:
Rightclick wampmanager tray icon -> Tools -> Restant DNS

This do also ipconfig /flushdns

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

Options: ReplyQuote
Re: WAMP 3 - Access from LAN
Posted by: RiggsFolly (Moderator)
Date: June 28, 2016 10:00PM

No that is a publicly addressable ip address.

There are 3 address ranges provided for Private ip address ranges for Small, Medium and Large Internal networks and they are


RFC1918 name    IP address range	           number of addresses
24-bit block	10.0.0.0 - 10.255.255.255	   16,777,216
20-bit block	172.16.0.0 - 172.31.255.255	   1,048,576
16-bit block	192.168.0.0 - 192.168.255.255      65,536

I am not a ip guru but if you use public ip addresses there is the likelyhood of great confusion

---------------------------------------------------------------------------------------------
(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: WAMP 3 - Access from LAN
Posted by: geabenitez (179.51.9.---)
Date: June 28, 2016 10:02PM

I just did, still not working.

Options: ReplyQuote
Re: WAMP 3 - Access from LAN
Posted by: geabenitez (179.51.9.---)
Date: June 28, 2016 10:04PM

RiggsFolly, so you are suggesting that if I change the IP address to for example 192.168.X.X there is a chance it should work?

Options: ReplyQuote
Re: WAMP 3 - Access from LAN
Posted by: RiggsFolly (Moderator)
Date: June 28, 2016 10:09PM

Yes that is what I am suggesting.

Can I ask why you picked the ip addresses you decided to use?

And just to check, we are talking about a home or office lan here are we not?

---------------------------------------------------------------------------------------------
(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: WAMP 3 - Access from LAN
Posted by: geabenitez (179.51.9.---)
Date: June 28, 2016 10:15PM

Well, it is kind of silly but the owner wanted to show even on the ip the date when the company was founded, and yes, it is an office lan.

well, in order to check if that is the issue i would have to make some changes on the Server and router. (I could do that later today) but is there any other possibility we may consider before that?

Options: ReplyQuote
Re: WAMP 3 - Access from LAN
Posted by: RiggsFolly (Moderator)
Date: June 28, 2016 11:11PM

Hhahah,

Yup Silly. You have to tell clients when things are a bad idea.

All those IP Addresses are already owned and paid for.

---------------------------------------------------------------------------------------------
(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: WAMP 3 - Access from LAN
Posted by: geabenitez (179.51.9.---)
Date: June 29, 2016 02:55AM

I just changed the IP addresses to 192.168.0.2 (server) and i am trying to connect from a differente PC using 192.168.0.10

I'm using [192.168.0.2] but still not working.

is there something else I could do?

Note: i still get the error message

"Forbidden

You don't have permission to access /my-site.dev on this server.
Apache/2.4.17 (Win64) PHP/5.6.16 Server at 192.168.0.2 Port 80"

thank you in advance.

Options: ReplyQuote
Re: WAMP 3 - Access from LAN
Posted by: geabenitez (179.51.9.---)
Date: June 29, 2016 03:27AM

I have just added the "my-site.dev" to my hosts file, something like.

192.168.0.2 my-site.dev

but i dont think is a good idea to edit every computer's hosts file.

is there something I could do over my server on DNS?

thank you.

Options: ReplyQuote
Re: WAMP 3 - Access from LAN
Posted by: RiggsFolly (Moderator)
Date: June 29, 2016 11:25AM

Yes,

If you have a DNS Server, then register your site with that.

---------------------------------------------------------------------------------------------
(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: WAMP 3 - Access from LAN
Posted by: RiggsFolly (Moderator)
Date: June 29, 2016 01:48PM

I would be interested to know if you got it all working, and what you did to get it all working.

Thanks

---------------------------------------------------------------------------------------------
(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: WAMP 3 - Access from LAN
Posted by: geabenitez (179.51.9.---)
Date: June 29, 2016 11:57PM

Yes it finally worked, it seems the only remaining configuration (besides all the above) was to add the IP and Domain to the Hosts file

example

109.108.0.2 my-site.dev (please note I left the new IP structure hehe).


Still pending to try by adding the DNS Record to my DNS server and test if that works

Options: ReplyQuote
Re: WAMP 3 - Access from LAN
Posted by: RiggsFolly (Moderator)
Date: June 30, 2016 12:13AM

>(please note I left the new IP structure hehe).Do you mean you did not chnage to a sensible Private IP range?

---------------------------------------------------------------------------------------------
(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: WAMP 3 - Access from LAN
Posted by: geabenitez (179.51.9.---)
Date: June 30, 2016 04:03PM

That's correct, i told to the owner, no DOB for the company allowed in LAN IP Addresses hahaha

Options: ReplyQuote
Re: WAMP 3 - Access from LAN
Posted by: RiggsFolly (Moderator)
Date: June 30, 2016 04:50PM

Ok thanks for clearing that up.

---------------------------------------------------------------------------------------------
(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
Pages: 12Next
Current Page: 1 of 2


Sorry, only registered users may post in this forum.