Welcome to the dBforums forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions, articles and access our other FREE features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload your own photos and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact support.

If you prefer not to see double-underlined words and corresponding ads, place your cursor
here for ContentLink opt out.

Go Back  dBforums > Data Access, Manipulation & Batch Languages > PHP > How to setup website on local network??

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 09-21-07, 14:46
uraknai uraknai is offline
Registered User
 
Join Date: Mar 2006
Posts: 41
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
Reply With Quote
  #2 (permalink)  
Old 09-21-07, 17:43
healdem healdem is online now
Jaded Developer
 
Join Date: Nov 2004
Location: out on a limb
Posts: 5,460
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
__________________
Warning
May! contain traces of NUT. people with NUT allergies should not pay attention to any of the above
Reply With Quote
  #3 (permalink)  
Old 09-27-07, 11:12
aschk aschk is offline
Registered User
 
Join Date: Mar 2007
Location: 636f6d7075746572
Posts: 734
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.
Reply With Quote
  #4 (permalink)  
Old 10-02-07, 01:21
Frunkie Frunkie is offline
Gives Bad Advice
 
Join Date: Mar 2007
Location: 010101010110100
Posts: 706
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.
__________________
I and many others around the world are of the strong belief that the universe was created by the Flying Spaghetti Monster. It was He who created all that we see and all that we feel. We feel strongly that the overwhelming scientific evidence pointing towards evolutionary processes is nothing but a coincidence, put in place by Him.
Reply With Quote
  #5 (permalink)  
Old 10-02-07, 07:01
aschk aschk is offline
Registered User
 
Join Date: Mar 2007
Location: 636f6d7075746572
Posts: 734
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?
Reply With Quote
  #6 (permalink)  
Old 10-02-07, 07:05
Frunkie Frunkie is offline
Gives Bad Advice
 
Join Date: Mar 2007
Location: 010101010110100
Posts: 706
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.
__________________
I and many others around the world are of the strong belief that the universe was created by the Flying Spaghetti Monster. It was He who created all that we see and all that we feel. We feel strongly that the overwhelming scientific evidence pointing towards evolutionary processes is nothing but a coincidence, put in place by Him.
Reply With Quote
  #7 (permalink)  
Old 10-02-07, 08:09
aschk aschk is offline
Registered User
 
Join Date: Mar 2007
Location: 636f6d7075746572
Posts: 734
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.
Reply With Quote
  #8 (permalink)  
Old 10-02-07, 08:49
Frunkie Frunkie is offline
Gives Bad Advice
 
Join Date: Mar 2007
Location: 010101010110100
Posts: 706
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.

Quote:
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.
__________________
I and many others around the world are of the strong belief that the universe was created by the Flying Spaghetti Monster. It was He who created all that we see and all that we feel. We feel strongly that the overwhelming scientific evidence pointing towards evolutionary processes is nothing but a coincidence, put in place by Him.
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On