How to change LOCALHOST to my IP ADDRESS

Need help installing PHP, configuring a script, or configuring a server? Then come on in and post your questions! We'll try to help the best we can!

Moderator: General Moderators

Post Reply
phppedant
Forum Newbie
Posts: 1
Joined: Tue Sep 16, 2008 2:59 am

How to change LOCALHOST to my IP ADDRESS

Post by phppedant »

Hi,
Currently I'm working on a lan and I have installed php with wamp server. Presently http://localhost/projectfoldername will return me the index page of the current project.

Now i want to open my application from my colleague's system who also is in the same LAN as I am.
Please let me know how i can do this .. I remember in java i used to do by changing a conf file. But i didnt find any here in php.

please help me
User avatar
VladSun
DevNet Master
Posts: 4313
Joined: Wed Jun 27, 2007 9:44 am
Location: Sofia, Bulgaria

Re: How to change LOCALHOST to my IP ADDRESS

Post by VladSun »

... localhost = 127.0.0.1 ?!?

Just type in your private IP address (e.g. 192.168.1.123) in your colleague's browser and be sure your firewall permits incomming connections to port 80.
There are 10 types of people in this world, those who understand binary and those who don't
User avatar
jackpf
DevNet Resident
Posts: 2119
Joined: Sun Feb 15, 2009 7:22 pm
Location: Ipswich, UK

Re: How to change LOCALHOST to my IP ADDRESS

Post by jackpf »

If you're running windows, open cmd and type ipconfig. Then type the ip address you see into your colleague's web browser.

I think the command for linux is ifconfig (can't check right now, I'm on my laptop with windows only).
Last edited by onion2k on Mon Aug 03, 2009 8:09 am, edited 1 time in total.
Reason: Removed line of text that no longer makes sense because it was refering to a deleted post.
Doug G
Forum Contributor
Posts: 282
Joined: Sun Sep 09, 2007 6:27 pm

Re: How to change LOCALHOST to my IP ADDRESS

Post by Doug G »

You'll probably need to open the http port in your firewall too.
iris
Forum Newbie
Posts: 18
Joined: Wed Sep 10, 2008 4:25 am

Re: How to change LOCALHOST to my IP ADDRESS

Post by iris »

If the problem still persist two things might be causing it;

You might need to put your apache webserver online if you re running a WAMP server, though i hv not used a different one before.

If you re already online then you might have to go into the httpd.conf file of your server or your root folder probably client computers are been denied access.

look for these lines

<Directory />
Options FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
</Directory>


change to this lines

<Directory />
Options FollowSymLinks
AllowOverride None
Order deny,allow
Allow from all
#Deny from all
</Directory>


then save it after which you restart the apache service

Pls make sure you duplicate the file before making any changes in case you did something wrong and your server begins to misbehave you can go back to the previous state.
Post Reply