9 Replies - 9560 Views - Last Post: 11 January 2013 - 10:55 PM

#1 ethereal1m  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 3
  • View blog
  • Posts: 223
  • Joined: 30-June 09

Connecting Apache Server with Android

Posted 14 December 2012 - 11:00 PM

Dear all,
I try to connect my apache webserver to android mobile device, but fails to do so. I have a website that is running on Apache and I want the mobile device able to access the site.

This is what I have: the laptop PC is running windows 7 and the mobile device is Samsung Galaxy Note 10.1 Android 4.0.2.

My first question before I begin the configuration is, how do the PC and the mobile device communicate? I'm thinking about creating an adhoc connection from the PC and let the mobile device receives the transmission. Is this the correct way?

regards,
Ethereal1m

Is This A Good Question/Topic? 0
  • +

Replies To: Connecting Apache Server with Android

#2 Atli  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 3719
  • View blog
  • Posts: 5,991
  • Joined: 08-June 10

Re: Connecting Apache Server with Android

Posted 14 December 2012 - 11:51 PM

Quote

My first question before I begin the configuration is, how do the PC and the mobile device communicate?

Depends on how you are using your Android device. How does it connect to the internet? WiFi or 3G/4G?

If you are using WiFi, you may well be able to set the Apache server up to allow connections from the local network. You'd have to configure it to listen on the network interface, rather than just on localhost. It may well do that already, but you should check nonetheless. And you'd have to set your Windows firewall (or whatever other software firewall you have) up to allow incoming traffic to port 80 on your PC. You may also have to configure any network firewalls (like on a router) to allow this traffic, though most of the time intranet traffic isn't blocked by routers.

If you are using 3G or 4G, then you would have to set your Apache server up to accept traffic from the internet. That will require the same kind of setup as above, except the router must be set up to forward incoming internet traffic on port 80 to the laptop. (Google your router for instructions on that. It's different for each one.) - It's worth noting that this opens you laptop up to additional threats. It will be open to requests from everybody, so you may want to set up some IP restriction or something.
Was This Post Helpful? 0
  • +
  • -

#3 ethereal1m  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 3
  • View blog
  • Posts: 223
  • Joined: 30-June 09

Re: Connecting Apache Server with Android

Posted 21 December 2012 - 11:06 PM

Hi Atli,
thanks for the reply...

My problem is I don't know how to make Apache communicating with the mobile device. Right know I have 2 hardware network without a router and they are connecting via wifi.

I was thinking about connecting the two using laptop windows 7 adhoc connection, but the mobile device cannot recognize it for some reason.

If I'm using the mobile device as a hotspot, the mobile device cannot see the apache server.

I'm going to ask the mobile forum, I think this is the wrong sub forum?

This post has been edited by ethereal1m: 21 December 2012 - 11:36 PM

Was This Post Helpful? 0
  • +
  • -

#4 ethereal1m  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 3
  • View blog
  • Posts: 223
  • Joined: 30-June 09

Re: Connecting Apache Server with Android

Posted 21 December 2012 - 11:53 PM

Dear all,
i have a problem connecting an Apache server to an Android Galaxy note 10.1 where the server resides in a windows 7 laptop. So this is a two hardware, tethering network configuration. The first choice was enabling a ad-hoc connection from the laptop and let the mobile device discovers it, however it can't.

The second choice is using tethering network from the mobile device and acting it as a hotspot. The laptop can recognize the mobile device, but the mobile device doesn't recognize the webserver.

My question is, what is the best way to accomplish this? How can I make either scenario work?

regards,
ethereal1m
Was This Post Helpful? 0
  • +
  • -

#5 farrell2k  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 851
  • View blog
  • Posts: 2,598
  • Joined: 29-July 11

Re: Connecting Apache Server with Android

Posted 26 December 2012 - 12:18 PM

What do you mean when you say that your device doesn't recognize the web server? Are you able to post or get anything from it? If not, are you sure it's running? Can you access the web server via other devices?
Was This Post Helpful? 0
  • +
  • -

#6 ethereal1m  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 3
  • View blog
  • Posts: 223
  • Joined: 30-June 09

Re: Connecting Apache Server with Android

Posted 11 January 2013 - 05:57 AM

The webserver can only be accessed from my local computer (my laptop). Unfortunately I don't have any other mobile device available.

What is the best way to configure and troubleshoot this?

This post has been edited by ethereal1m: 11 January 2013 - 05:58 AM

Was This Post Helpful? 0
  • +
  • -

#7 farrell2k  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 851
  • View blog
  • Posts: 2,598
  • Joined: 29-July 11

Re: Connecting Apache Server with Android

Posted 11 January 2013 - 12:36 PM

View Postethereal1m, on 11 January 2013 - 12:57 PM, said:

The webserver can only be accessed from my local computer (my laptop).


Why is that? Apahe has to be specially configured to only allow local traffic. Send an http request through the browser of your device to the IP of your laptop (or router if you're on one) running the web server.
Was This Post Helpful? 1
  • +
  • -

#8 ethereal1m  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 3
  • View blog
  • Posts: 223
  • Joined: 30-June 09

Re: Connecting Apache Server with Android

Posted 11 January 2013 - 10:49 PM

hmmm..your statement reminds me that I forgot to bind the interface IP address in Apache. I use "Listen" directive, and it solves the problem...

thanks for the pointer....
Was This Post Helpful? 0
  • +
  • -

#9 ethereal1m  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 3
  • View blog
  • Posts: 223
  • Joined: 30-June 09

Re: Connecting Apache Server with Android

Posted 11 January 2013 - 10:52 PM

Dear all,
I solved the problem in the following thread:
My link

The problem was in my Apache configuration, I didn't bind the WIFI IP address....
Was This Post Helpful? 1
  • +
  • -

#10 macosxnerd101  Icon User is offline

  • Self-Trained Economist
  • member icon




Reputation: 10658
  • View blog
  • Posts: 39,571
  • Joined: 27-December 08

Re: Connecting Apache Server with Android

Posted 11 January 2013 - 10:55 PM

Duplicate threads merged. Please avoid duplicate and cross-posting. One thread per topic is sufficient.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1