Make app studio mobile application communicate with Wamp server

Dear all,

I have made an app that needs to communicate and store some data on a server deployed (for developing purposes) locally on my own computer using WAMP.
Now I need to deply the app to a mob phone (using phone gap) and access the local server from outside the LAN.
I am running under Windows10 so, some modifications are needed to be made on some server files (probably httpd-vhosts.conf and httpd.conf) but I am not sure what exactly to modify.

Any help appriciated.

BR

Good Morning.

It’s been a long time since I did this so I’m sure some things have changed. Having said that, I ran into several issues accessing the server from outside the house.

At the time, my cable company (Comcast) would block any incoming requests for http, ping etc. I switched to the phone company to bypass that obstacle.

Next, I had the problem of ever changing IP addresses (every time the router rebooted I would get a new IP address - this was a big deal here in south Florida). To solve this I had to use a DNS server I could access remotely and update easily. There are several services available for this plus your domain registrar.

This became so bad that I wrote some scripts to ping the router, capture the IP address and if it was different then I’d call a cURL script to login to godaddy and update my DNS settings.

Then came a time when the phone company would only assign one public IP address to a house unless you ordered a business account. That meant that my router had the only public IP address and my server was relegated to a 127.0.x.x address.

Ultimately it just became too much trouble so I plunked down a few $ per month for a hostgator account on a shared server.

So, my advice is to start with your router and see if it has a mechanism to pass http protocol requests to another device. That will be the biggest stumbling block.

There’s some other advice here.

Thanks, I’ll check that.
For the time being, I deploy my app in two different ways.

  1. On a specific folder (under www of Wamp) where I access it through a web browser with localhost, and,
  2. By ‘Start in desktop browser’ option which opens a browser and redirects me to 127.0.0.1:56122, which is not under www of wamp.

So, the question is where is the physical location of 127.0.0.1:56122 on my hard drive?

The problem is although I can reach the wamp server from outside, when I deploy my app to the mobile, it cannot communicate with the wamp server…

Does anyone knows where appstudio deploys the apps which then are phonegapped and become mobile apps and with which server the mobile app is communicating?

What you’re grappling with is what’s called the “endpoint.” If you can access the server from outside you’re most of the way there. What is the server returning to you? IOW, from outside your network if you issue an http:// request from your phones browser, what are you getting back?

Here are two links I found for you.

YouTube
StackOverflow

I am still at a preliminary phase since I struggle to open ports on my router…
So, no I am not getting anything back…

I suspected as much. The endpoint you’re hitting is your router. Opening port 80 on the router and sending all that traffic to your WAMP will be your biggest challenge.

A good way to test is to turn off the wifi on your phone… this way when you try to connect it will be done through the cell towers and back to your router.

Its easy to test if an external port is open on the route using several online tools (open port finders).
The other way is to use my mob phone’s 4G net to hit my router’s external IP:Port…

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.