Page 1 of 2

connect to localhost xampp from android emuletor

PostPosted: 19. September 2011 18:31
by peppe88
connect to localhost xampp from android emuletor

Postby peppe88 ยป 19. September 2011 19:12
hi guys, i've problem. i've to connect my emulator's android with localhost apache xampp (than i've to conncect to a web application with php)
-android side is correct
i do i webview with my ip address
-xampp side
new xampp security concept
acces forbidden.....setting the file "httpd-xampp.conf"
i changed the file with
#
# New XAMPP security concept
#
# <LocationMatch "^/(?i:(?:xampp|security|licenses|phpmyadmin|webalizer|server-status|server-info))">
# Order deny,allow
# Deny from all
# Allow from all
#
# ErrorDocument 403 /error/HTTP_XAMPP_FORBIDDEN.html.var
# </LocationMatch>

before this it was
Allow from 127.0.0.1/8

i try to comment out with # but nothing

but the conncection is forbidden the same...
help me please

Re: connect to localhost xampp from android emuletor

PostPosted: 19. September 2011 18:37
by peppe88
[Mon Sep 19 19:36:01 2011] [error] [client ********] client denied by server configuration: C:/xampp/htdocs/xampp/

solutions?

Re: connect to localhost xampp from android emuletor

PostPosted: 19. September 2011 18:59
by Sharley
Did you try to connect using localhost address.
http://localhost

BTW I don't know anything about an Android Emulator.

Re: connect to localhost xampp from android emuletor

PostPosted: 19. September 2011 19:08
by peppe88
no localhost doesn't use in this case
because localhost emulator is the machine where the emulator start, but i want the localhost of the pc and so i have to change localhost with my ip...

i don't know what i have to do to work :( :( :( :(

Re: connect to localhost xampp from android emuletor

PostPosted: 19. September 2011 19:30
by Sharley
What IP address are you using?

Re: connect to localhost xampp from android emuletor

PostPosted: 19. September 2011 19:33
by peppe88
37.4.***

Re: connect to localhost xampp from android emuletor

PostPosted: 19. September 2011 19:34
by peppe88
it is my ip LAN
I've fastweb, the problem is this??

Re: connect to localhost xampp from android emuletor

PostPosted: 19. September 2011 19:43
by Sharley
Change the security settings back to the original in the httpd-xampp.conf file.

Then add your IP to the lists like so
#
# New XAMPP security concept
#
<LocationMatch "^/(?i:(?:xampp|security|licenses|phpmyadmin|webalizer|server-status|server-info))">
Order deny,allow
Deny from all
Allow from 127.0.0.0/8
Allow from 34.4
ErrorDocument 403 /error/HTTP_XAMPP_FORBIDDEN.html.var
</LocationMatch>
Complete the address in red, then save the file and restart Apache.

Re: connect to localhost xampp from android emuletor

PostPosted: 19. September 2011 19:48
by peppe88
nothing the error remain

Re: connect to localhost xampp from android emuletor

PostPosted: 19. September 2011 19:52
by Sharley
What is your LAN IP usually starts with 192.168.
Use it if you can.

To find the correct IP go to:
Start>Run...>type cmd>type ipconfig>return

Re: connect to localhost xampp from android emuletor

PostPosted: 19. September 2011 19:56
by peppe88
i have fastweb my ipv4 doesn't become with 192. ... but 37.4
i take it by cmd ipconfig---LAN network, ipv4

Re: connect to localhost xampp from android emuletor

PostPosted: 19. September 2011 20:14
by Sharley
You can't connect using your ISP generated IP address:
viewtopic.php?f=16&t=48085

So fastweb in Italy may well be your problem.

I would still work on using localhost or 127.0.0.1 as Android will be listening on a different port number to Apache.

Or you could use a proxy server to access using your fastweb IP.

Re: connect to localhost xampp from android emuletor

PostPosted: 19. September 2011 20:38
by peppe88
maybe i have to use a proxy server e connect my ip fastweb to proxy
i will try e tell

Re: connect to localhost xampp from android emuletor

PostPosted: 19. September 2011 20:41
by Sharley

Re: connect to localhost xampp from android emuletor

PostPosted: 19. September 2011 21:08
by peppe88
i've a problem with the proxy server
what i have to do??? could you help me ?
i tried with proxy server ntlm but nothing..maybe I have done something wrong