...

View Full Version : Make my localhost viewabe by a local IP address



tomharto
05-24-2012, 01:46 PM
I was wondering if I could set my localhost an IP address, Atm its running on my PC, but i'd like it so if i had my laptop on the same network, if i typed something like 192.168.1.60 it would load the localhost on my PC.

Is this even possible?

Spookster
05-24-2012, 04:04 PM
I was wondering if I could set my localhost an IP address, Atm its running on my PC, but i'd like it so if i had my laptop on the same network, if i typed something like 192.168.1.60 it would load the localhost on my PC.

Is this even possible?

Yes it is.

VIPStephan
05-24-2012, 06:31 PM
Yes it is.

I confirm that.

primefalcon
05-24-2012, 08:47 PM
something this simple you should of just tried, I mean its just typing an address into your browser to see if it works or not..... which unless you have a firewall blocking access it'll work fine

tomharto
05-24-2012, 08:48 PM
Okay it's good to know that I can do it :p, is there any guide on how to do it? I tried googling but I found nothing.

Spookster
05-24-2012, 09:51 PM
Okay it's good to know that I can do it :p, is there any guide on how to do it? I tried googling but I found nothing.

You didn't mention what it is you are talking about so I assume you mean a webserver? Which one? If Apache then you just need to modify the httpd.conf which is likely only allowing you access from localhost and denying access to everything else.

tomharto
05-24-2012, 10:36 PM
You didn't mention what it is you are talking about so I assume you mean a webserver? Which one? If Apache then you just need to modify the httpd.conf which is likely only allowing you access from localhost and denying access to everything else.

Yeah it's on a WAMP server running on my PC. I'll look through the httpd.conf file and look for the bit about denying access, thanks.

Spookster
05-24-2012, 10:56 PM
Yeah it's on a WAMP server running on my PC. I'll look through the httpd.conf file and look for the bit about denying access, thanks.

I use wampserver and just made this same modification to allow what you are wanting. Just modify this section:



<Directory "C:/wamp/www/">
#
# Possible values for the Options directive are "None", "All",
# or any combination of:
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
# The Options directive is both complicated and important. Please see
# http://httpd.apache.org/docs/2.2/mod/core.html#options
# for more information.
#
Options Indexes FollowSymLinks
#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# Options FileInfo AuthConfig Limit
#
AllowOverride all
#
# Controls who can get stuff from this server.
#
# onlineoffline tag - don't remove
Order Deny,Allow
Deny from all
Allow from 127.0.0.1
</Directory>


Change the bolded blue section and remove the Deny from all and change the other to Allow from all.

You will need to restart services after you make changes to the Apache config file. Then just click on your wampserver icon in the system tray and click Put Online. Then you will be able to access everything in your www folder from the IP address of that PC.

Spookster
05-24-2012, 11:05 PM
And FYI the httpd.conf file in wampserver will be located here: C:\wamp\bin\apache\Apache2.2.21\conf

tomharto
05-24-2012, 11:11 PM
And FYI the httpd.conf file in wampserver will be located here: C:\wamp\bin\apache\Apache2.2.21\conf

Thank you, i'm surrently on my laptop running a server i set up and I've got it working on here, so i should be able to sort it on the PC i want it :)



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum