Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 10 of 10
  1. #1
    Regular Coder
    Join Date
    Jul 2010
    Location
    Sheffield
    Posts
    822
    Thanks
    93
    Thanked 18 Times in 18 Posts

    Make my localhost viewabe by a local IP address

    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?

  • #2
    Supreme Overlord Spookster's Avatar
    Join Date
    May 2002
    Location
    Marion, IA USA
    Posts
    6,273
    Thanks
    4
    Thanked 83 Times in 82 Posts
    Quote Originally Posted by tomharto View Post
    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.
    Spookster
    CodingForums Supreme Overlord
    All Hail Spookster

  • #3
    The fat guy next door VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    8,471
    Thanks
    6
    Thanked 980 Times in 953 Posts
    Quote Originally Posted by Spookster View Post
    Yes it is.
    I confirm that.

  • #4
    Regular Coder primefalcon's Avatar
    Join Date
    Aug 2008
    Location
    /home/primefalcon/
    Posts
    678
    Thanks
    8
    Thanked 39 Times in 39 Posts
    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

  • #5
    Regular Coder
    Join Date
    Jul 2010
    Location
    Sheffield
    Posts
    822
    Thanks
    93
    Thanked 18 Times in 18 Posts
    Okay it's good to know that I can do it , is there any guide on how to do it? I tried googling but I found nothing.

  • #6
    Supreme Overlord Spookster's Avatar
    Join Date
    May 2002
    Location
    Marion, IA USA
    Posts
    6,273
    Thanks
    4
    Thanked 83 Times in 82 Posts
    Quote Originally Posted by tomharto View Post
    Okay it's good to know that I can do it , 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.
    Spookster
    CodingForums Supreme Overlord
    All Hail Spookster

  • #7
    Regular Coder
    Join Date
    Jul 2010
    Location
    Sheffield
    Posts
    822
    Thanks
    93
    Thanked 18 Times in 18 Posts
    Quote Originally Posted by Spookster View Post
    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.

  • #8
    Supreme Overlord Spookster's Avatar
    Join Date
    May 2002
    Location
    Marion, IA USA
    Posts
    6,273
    Thanks
    4
    Thanked 83 Times in 82 Posts
    Quote Originally Posted by tomharto View Post
    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:

    Code:
    <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.
    Last edited by Spookster; 05-24-2012 at 11:06 PM.
    Spookster
    CodingForums Supreme Overlord
    All Hail Spookster

  • #9
    Supreme Overlord Spookster's Avatar
    Join Date
    May 2002
    Location
    Marion, IA USA
    Posts
    6,273
    Thanks
    4
    Thanked 83 Times in 82 Posts
    And FYI the httpd.conf file in wampserver will be located here: C:\wamp\bin\apache\Apache2.2.21\conf
    Spookster
    CodingForums Supreme Overlord
    All Hail Spookster

  • #10
    Regular Coder
    Join Date
    Jul 2010
    Location
    Sheffield
    Posts
    822
    Thanks
    93
    Thanked 18 Times in 18 Posts
    Quote Originally Posted by Spookster View Post
    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


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •