Results 1 to 8 of 8
  1. #1
    Join Date
    Mar 2006
    Posts
    41

    Unanswered: How to setup website on local network??

    Hi,

    I have successfully installed APACHE, MYSQL and PHP by following the instructions in the sticky above. I can access the website on the machine it's installed on by typing http://localhost/web/index.php in the explorer bar.

    What I now need is to be able to access this website from any computer on the same network. Is this possible and if so how can I achieve this?

    Cheers,


    Nick

  2. #2
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    part of that is your internal network setup.. best to talk to your network trolls to make sure the physical IP address or machine name is correctly propogated in your DNS servers or if the worst comes to the worst you may have to do it the old way and edit each PC's hosts file.

    if you are happy with your users referring to the webserver as an IP Address supply that to your users eg http://192.168.1.99/index.htm, opthjerwise you may need to set up your apache initialisation file so that it knows www.mywonderfulsite.org is located at 192.168.1.99

    then you need to make sure that MySQL has adequate security permissions for the computers and users you expect to use the app.

    there are certainly more step to do but I tend to forget its so long since I last set up a webserver for network use.

    if you are assigning permissions in MySQL Id suggest you try to use MySQL Administrator in place of the MySQL command line. whilst you are at it have a look atg MySQL Query Browser.. both available from the MySQL site
    I'd rather be riding on the Tiger 800 or the Norton

  3. #3
    Join Date
    Mar 2007
    Location
    636f6d7075746572
    Posts
    770
    Easiest way is to get each user just to point their browser to
    http://xxx.xxx.xxx.xxx/web/index.php
    Where the xxx's represent the computer that you installed Apache on ip.

  4. #4
    Join Date
    Mar 2007
    Location
    010101010110100
    Posts
    803
    Quote Originally Posted by aschk
    Easiest way is to get each user just to point their browser to
    http://xxx.xxx.xxx.xxx/web/index.php
    Where the xxx's represent the computer that you installed Apache on ip.
    That assumes that he isn't using DHCP. He would have to have a static IP on that machine first.

  5. #5
    Join Date
    Mar 2007
    Location
    636f6d7075746572
    Posts
    770
    Very true, most do use DHCP now.
    It's probably worth asking what you use for DNS inside your network? Are you reliant on your router?

  6. #6
    Join Date
    Mar 2007
    Location
    010101010110100
    Posts
    803
    Quote Originally Posted by aschk
    Very true, most do use DHCP now.
    It's probably worth asking what you use for DNS inside your network? Are you reliant on your router?
    Hey aschk,

    No, I am not reliant on my router. I run a master and a slave DNS machine. They are both on the same subnet but its better than nothing.

    I hardly use DHCP anymore. I will usually run static on everything. It is certainly less prone to problems.

  7. #7
    Join Date
    Mar 2007
    Location
    636f6d7075746572
    Posts
    770
    In which case you can probably edit the hosts file on your DNS to refer to the internal IP of the machine. I believe when linux (are you using linux??) does DNS lookups it checks the local host file first (/etc/hosts).
    Append the following record :
    Code:
    <IP>                <full domain name>        <shortname>
    xxx.xxx.xxx.xxx     internal.yourdomain.com   internal
    I think this should do the trick. So basically you can take over any domain out there (for your internal usage). e.g. google.com
    All of your internal machines should now be able to go to http://internal.yourdomain.com or http://internal , i think. Not tried and tested but I think the theory is right.

  8. #8
    Join Date
    Mar 2007
    Location
    010101010110100
    Posts
    803
    Quote Originally Posted by aschk
    In which case you can probably edit the hosts file on your DNS to refer to the internal IP of the machine. I believe when linux (are you using linux??) does DNS lookups it checks the local host file first (/etc/hosts).
    Append the following record :
    Code:
    <IP>                <full domain name>        <shortname>
    xxx.xxx.xxx.xxx     internal.yourdomain.com   internal
    Either you are going to use the hosts file or you will use DNS but not both. I use UNIX and Linux on occasion but they both work almost in the same way.

    DNS uses BIND(8) to do its lookups not the host file. I would recommend just using the hosts file because it is so much easier than setting up DNS.

    I think this should do the trick. So basically you can take over any domain out there (for your internal usage). e.g. google.com
    All of your internal machines should now be able to go to http://internal.yourdomain.com or http://internal , i think. Not tried and tested but I think the theory is right.
    Yes, you are correct. Depending on how the hosts file is set up, you can just then access that machine with one of the names in that file such as:

    127.0.0.1 localhost localhost.testdomain.com testdomain
    192.168.1.1 localhost localhost.testdomain.com testdomain

    The above will allow "localhost" "localhost.testdomain.com" "testdomain" to be accessed from the browser.

    You will also need to set variables in the httpd.conf file to accept the connections on those addresses.

Posting Permissions

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