Connecting to localhost over wifi?

For discussions about game development that does not fit in any of the other topics.
Post Reply
User avatar
OldRod
Posts: 1320
Joined: Sun Sep 20, 2009 4:26 pm

Connecting to localhost over wifi?

Post by OldRod »

As I'm tinkering with my project, I want to make sure I am iPad/mobile friendly with my browser layout/code. Is there a way I can connect to the localhost of my desktop machine with my iPad? They are both on the same wifi network.

I tried accessing the ip address of the desktop, but that didn't work. I have opened port 80 (I think) on my router, but since both are behind the router that shouldn't matter should it? I don't have Windows firewall running on the desktop at the moment, so the only firewall I have is my router.

I've google'd this and found several possible ways to do it, but so far nothing has worked.

Has anyone done this?
User avatar
xcalpro
Posts: 65
Joined: Sat May 19, 2012 10:25 pm

Re: Connecting to localhost over wifi?

Post by xcalpro »

I am assuming your running a web server on your desktop like xammp or wamp. If your server is running correctly then in theory you should be able to access the desktops local ip.
Skills: HTML5, JavaScript, PHP, SQL, Python, BASIC, HeroEngine(HSL), AGS(Lua), Unity, Photon, 3D Max, Mudbox, Photoshop, Poser, Flash
"Jack-of-all-Trades, Master of none"
User avatar
OldRod
Posts: 1320
Joined: Sun Sep 20, 2009 4:26 pm

Re: Connecting to localhost over wifi?

Post by OldRod »

Yeah, I'm using WAMP.

I figured I should be able to also... no luck yet though :)

I'll keep looking.
User avatar
Jackolantern
Posts: 10891
Joined: Wed Jul 01, 2009 11:00 pm

Re: Connecting to localhost over wifi?

Post by Jackolantern »

Could it be a firewall issue? I have actually never tried to connect to localhost from another machine on the same LAN. To test mobile I have always put it up on a free shared host, but this would be much easier. I am interested to know if it is possible :)
The indelible lord of tl;dr
User avatar
hallsofvallhalla
Site Admin
Posts: 12026
Joined: Wed Apr 22, 2009 11:29 pm

Re: Connecting to localhost over wifi?

Post by hallsofvallhalla »

You have to put it online.

Image
User avatar
OldRod
Posts: 1320
Joined: Sun Sep 20, 2009 4:26 pm

Re: Connecting to localhost over wifi?

Post by OldRod »

I did that.

Still no luck.

I read somewhere that I need to edit some settings in my Apache config file, but haven't had a chance to try that yet.
User avatar
hallsofvallhalla
Site Admin
Posts: 12026
Joined: Wed Apr 22, 2009 11:29 pm

Re: Connecting to localhost over wifi?

Post by hallsofvallhalla »

yep, have to change deny all to allow all or allow specific IP as well.
User avatar
OldRod
Posts: 1320
Joined: Sun Sep 20, 2009 4:26 pm

Re: Connecting to localhost over wifi?

Post by OldRod »

OK, I got it working, finally!

Changed my http.conf file to "allow from all"
Created a custom rule in ESET Smart Security (my firewall) to allow port 80 to be accessed.

Set ESET to automatic mode with exceptions (to allow the rule to run)

It works!!

My iPad can now run my browser game :D

My earlier attempts I forgot that I was running ESET - I had Windows firewall disabled, but I had to modify ESET too :)
User avatar
hallsofvallhalla
Site Admin
Posts: 12026
Joined: Wed Apr 22, 2009 11:29 pm

Re: Connecting to localhost over wifi?

Post by hallsofvallhalla »

nice!
Post Reply

Return to “General Development”