Accessing server through LAN
Posted by: guarienti (---.175.44.152.static.gvt.net.br)
Date: February 07, 2013 03:02PM

Here's what's happening:

I've been trying to setup a server to display websites over a LAN.
After installing MC VC 2008, MC VC 2010, WampServer i can access all of WampServer's funcionalitys locally at localhost and 127.0.0.1 without any hiccups.

Then I went to the icon and clicked on 'Put Online'. Services restarted and the icon is back to green.
Then I try to access the server through it's IP on the browser (http://10.0.0.xx/index.php).

Here's the problem, the http response it's a 403 code.
I know the server gets the request due to it's obvious response and I'm sure it is the correct server/ip as it is the only server installed in the LAN using Apache2/PHP5.4.3:

HTTP/1.0 403 Forbidden
Date: Thu, 07 Feb 2013 14:57:22 GMT
Server: Apache/2.4.2 (Win64) PHP/5.4.3

So, i do not know if i should access it in another manner or if i need to set something up besides clickin on 'Put Online'.

The setup is as follows:

Windows Server 2003 x64
WampServer x64 -> Apache/2.4.2 and PHP/5.4.3
Both MSVCR 2008 and 2010 installed.
Icon is green.

Thanks in advance.
Bruno Guarienti

Options: ReplyQuote
Re: Accessing server through LAN
Posted by: RiggsFolly (---.as13285.net)
Date: February 07, 2013 03:26PM

Bruno,

Sound like you have it right. If I remember correctly one of the 64bit wamp installs went out with a minor problem in the config, cannot remember what the issue was exactly but something to do with apache 2.4 and the new

Require all xxxx
replacing
Allow from xxx

I seen to remember it was just a case of deleting the line and rewriting it ( some wierd byte corruption i guess )

Check the httpd.conf and also the c:\wamp\alias configs for the tools like phpmyadmin


Sorry not to be more helpful

Options: ReplyQuote
Re: Accessing server through LAN
Posted by: guarienti (---.175.44.152.static.gvt.net.br)
Date: February 07, 2013 03:50PM

Ok, let me see if i got it right.

I went to httpd.conf and rewrote the following as they were:

<Directory />
AllowOverride none
Require All denied
</Directory>

<Files ".ht*">
Require All denied
</Files>

<Directory "cgi-bin">
AllowOverride None
Options None
Require All granted
</Directory>

On C:\wamp\alias, on files phpmyadmin.conf, sqlbuddy.conf and webgrind.php i delete and rewrote, as they were, the following (same on all):

<Directory "c:/wamp/apps/phpmyadminWAMPPHPMYADMINVERSION/">
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Require local
</Directory>

Just rewriting them was what u suggested?
Because after i did so, the apache wont go back up! =/

Options: ReplyQuote
Re: Accessing server through LAN
Posted by: guarienti (---.175.44.152.static.gvt.net.br)
Date: February 07, 2013 03:52PM

I will download the wampserver installation file and reinstall, then ill try again.

Options: ReplyQuote
Re: Accessing server through LAN
Posted by: guarienti (---.175.44.152.static.gvt.net.br)
Date: February 07, 2013 04:12PM

Ok, i got it to work.

Here's what needed changing:

On httpd.conf on <Directory "c:/wamp/www/"> changed 'Require local' to 'Require all granted'.

RiggsFolly, could u confirm this should be as I stated when 'Put Online' is selected? Or is this a security liability?

Options: ReplyQuote
Re: Accessing server through LAN
Posted by: RiggsFolly (---.as13285.net)
Date: February 08, 2013 01:16PM

guarienti,

yea like I said I could not remember the exact issue, sorry to have been vague.

I believe you have done the correct thing.

'Require all denied', should deny access to everyone
'Require all granted', allows access to anybody.
'Require local', is the same as saying localhost and 127.0.0.1 and ::1 and will only allow access from the machine running the Apache server.

If you have more than one machine and you want to allow from anywhere on your local lan you can also use:
'Require ip 192.168.1'
or even only allow specific ip addresses
'Require ip 192.168.1.10 192.168.1.11'



http://httpd.apache.org/docs/trunk/da/mod/mod_authz_host.html

Options: ReplyQuote
Re: Accessing server through LAN
Posted by: stevenmartin99 (Moderator)
Date: February 08, 2013 01:22PM

you can write it all in one line

Require local ip 192.168

for the entire LAN and PC running wamp

Steven Martin
stevenmartin99@gmail.com
stevenmartin99@hotmail.com
PampServer.com - [pampserver.com]



Edited 1 time(s). Last edit at 02/08/2013 07:31PM by stevenmartin99.

Options: ReplyQuote
Re: Accessing server through LAN
Posted by: guarienti (---.175.44.152.static.gvt.net.br)
Date: February 08, 2013 01:34PM

Thanks for the answers!

I'll most certainly try those configs as targeting specific IPs is a very interesting feature.

Att.,
Bruno.

Options: ReplyQuote
Re: Accessing server through LAN
Posted by: RiggsFolly (---.as13285.net)
Date: February 08, 2013 01:49PM

Just a thought Steven,

would that not be better as

Require local ip 192.168

Otherwise it would allow address's not in the Private Network address space into the system, or is ip 192 special in some way?

Options: ReplyQuote
Re: Accessing server through LAN
Posted by: stevenmartin99 (Moderator)
Date: February 08, 2013 07:41PM

yes sorry!


just to clarify the full LAN IP Range should be
Allow from 127.0.0.1  ::1  localhost
Allow from 10.0.0.0/8   172.16.0.0/12  192.168.0.0/16


or for Apache2.4
Require local
Require  ip  10.0.0.0/8  172.16.0.0/12  192.168.0.0/16

Steven Martin
stevenmartin99@gmail.com
stevenmartin99@hotmail.com
PampServer.com - [pampserver.com]

Options: ReplyQuote


Sorry, only registered users may post in this forum.