Go Back   CodingForums.com > :: Server side development > Apache configuration

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 11-30-2012, 02:19 PM   PM User | #1
elhippie
New Coder

 
Join Date: Mar 2012
Posts: 22
Thanks: 0
Thanked 0 Times in 0 Posts
elhippie is an unknown quantity at this point
How can i access localhost from my phone?

of course i can access localhost on my pc, but i wanna access it on my andriod, we are sharing the same network via wifi

thnks for the help this would help alot
elhippie is offline   Reply With Quote
Old 11-30-2012, 02:29 PM   PM User | #2
XmisterIS
Regular Coder

 
Join Date: Jun 2010
Posts: 241
Thanks: 51
Thanked 6 Times in 6 Posts
XmisterIS is an unknown quantity at this point
You should just be able to go to localhost on your phone's browser like you would on any other machine. Type localhost into the address bar on your phone's browser and tap 'go' ... it should work!
XmisterIS is offline   Reply With Quote
Old 11-30-2012, 11:53 PM   PM User | #3
elhippie
New Coder

 
Join Date: Mar 2012
Posts: 22
Thanks: 0
Thanked 0 Times in 0 Posts
elhippie is an unknown quantity at this point
that doesn't work so im thinking firewall settings
elhippie is offline   Reply With Quote
Old 12-01-2012, 12:09 AM   PM User | #4
elhippie
New Coder

 
Join Date: Mar 2012
Posts: 22
Thanks: 0
Thanked 0 Times in 0 Posts
elhippie is an unknown quantity at this point
doesnt work and fire wall setting are off any suggestions?
elhippie is offline   Reply With Quote
Old 12-01-2012, 02:31 AM   PM User | #5
stevenmw
Regular Coder

 
stevenmw's Avatar
 
Join Date: Jun 2007
Location: OK
Posts: 449
Thanks: 26
Thanked 30 Times in 30 Posts
stevenmw is an unknown quantity at this point
That's odd. it should simply work. Log into your router and look for connected devices. If your phone shows up in the list then that is even more odd, but if it isn't you know it isn't on the LAN.

If it works on your pc, it should work on your phone. You're absolutely sure you're on the same LAN? Make sure your 3 or 4 g is turned off, and only wifi is on your phone.

Try 127.0.0.1
__________________
--
Thanks!
stevenmw is offline   Reply With Quote
Old 12-01-2012, 06:02 AM   PM User | #6
felgall
Master Coder

 
felgall's Avatar
 
Join Date: Sep 2005
Location: Sydney, Australia
Posts: 5,530
Thanks: 0
Thanked 503 Times in 494 Posts
felgall is a jewel in the roughfelgall is a jewel in the roughfelgall is a jewel in the rough
localhost is always the web server running on the device you are using. Presumably your phone isn't running a web server and you want to access the web server on your local computer - in which case just substitute the IP address of that computer and don't use 127.0.0.1

For example if the server is running on a computer with IP address 192.168.1.25 then on that computer 127.0.0.1, localhost and 192.168.1.25 all point to the same place but the only one that points to the web server on that computer from other devices is 192.168.1.25
__________________
Stephen
Learn Modern JavaScript - http://javascriptexample.net/
Helping others to solve their computer problem at http://www.felgall.com/

Last edited by felgall; 12-01-2012 at 06:07 AM..
felgall is offline   Reply With Quote
Old 12-01-2012, 04:27 PM   PM User | #7
elhippie
New Coder

 
Join Date: Mar 2012
Posts: 22
Thanks: 0
Thanked 0 Times in 0 Posts
elhippie is an unknown quantity at this point
Quote:
Originally Posted by felgall View Post
localhost is always the web server running on the device you are using. Presumably your phone isn't running a web server and you want to access the web server on your local computer - in which case just substitute the IP address of that computer and don't use 127.0.0.1

For example if the server is running on a computer with IP address 192.168.1.25 then on that computer 127.0.0.1, localhost and 192.168.1.25 all point to the same place but the only one that points to the web server on that computer from other devices is 192.168.1.25
i wanna write a rap song about you
elhippie is offline   Reply With Quote
Old 12-03-2012, 11:51 AM   PM User | #8
XmisterIS
Regular Coder

 
Join Date: Jun 2010
Posts: 241
Thanks: 51
Thanked 6 Times in 6 Posts
XmisterIS is an unknown quantity at this point
Quote:
Originally Posted by felgall View Post
localhost is always the web server running on the device you are using. Presumably your phone isn't running a web server and you want to access the web server on your local computer - in which case just substitute the IP address of that computer and don't use 127.0.0.1

For example if the server is running on a computer with IP address 192.168.1.25 then on that computer 127.0.0.1, localhost and 192.168.1.25 all point to the same place but the only one that points to the web server on that computer from other devices is 192.168.1.25
*facepalm*

Yes, that's perfectly obvious now that you've pointed out the obvious!
XmisterIS is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 06:14 PM.


Advertisement
Log in to turn off these ads.