Forum Moderators: phranque

Message Too Old, No Replies

Apache initial Setup

         

andrewsmd

12:08 am on Feb 3, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I have two machines at my house and I would like to install apache mysql and pretty much all of the goodies you can get with php. Does anyone have a good link to download the stuff. Also, I want to install it on my secondary machine. How would I access those files on my LAN. Meaning if my computer is 192.168.1.15 and the apache server is 1.17 how would I access those across the LAN. Thanks,

jdMorgan

2:09 am on Feb 3, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



There are so many packages out there, it's hard to say which one you'd like. Look for the one that has everything you need, whatever you *might* need, and nothing that you know you don't need.

You can access your server on your local network using its IP address from your workstation, e.g. "http://192.168.0.15/" in the browser address bar.

If you want to give your server a "local domain name," you can do so by adding entries in each computer's "hosts" file. That's its name, just 'hosts' with no file extension. It will be present on any computer that was ever intended to connect to the internet, but its location varies based on operating system and version, so do a search for it. Define your domain name as 192.168.1.15 on the workstation(s), and as 127.0.0.1 (loopback) on the server itself (if you want to be able to test the server from the server machine itself).

This domain definition in the hosts file will override DNS on the Web, so if you want to declare your server's domain as google.com, you can. But of course, you won't be able to access the real google.com if you do.

Also, the domain definition in the hosts file only applies to the computer where that file is located; Your domain will be undefined for users out on the Web unless you register the domain name and point it in DNS to the public IP address of your network, port forward those requests from your router to your server's LAN IP address, and allow incoming port 80 traffic through all applicable firewalls.

Jim

andrewsmd

2:31 am on Feb 3, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Ok I have apache mysql pear and all of that jazz working fine on the machine now. Here is my problem, when I try to go to that machines local ip within my router 192.168.1.102/localhost it does not work it just says page load error. I don't really understand what you are saying in the third paragraph. Where do I go to set that domain. I have apache running but I really don't know how to use it. Thanks for all of your help.

andrewsmd

2:34 am on Feb 3, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Do I have to enable a DHCP server on the machine or something.

jdMorgan

3:11 am on Feb 3, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I'm not sure why you're adding "/localhost" in there... If the IP address of the server is 192.168.1.102, then put only "http://192.168.1.102/" in the browser's address bar.

Make sure the firewall on your server is set to allow incoming HTTP connections to port 80; The default setting on Windows Firewall (and most others) is to block such connections.

Jim

andrewsmd

4:16 am on Feb 3, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



So I opened my firewall and now I get the connection was interrupted. I am allowing port forwarding through my router on port 80 and I still cannot access it. Any other suggestions. Oh I was looking at 192.168.1.102 the /localhost was a typo. Do I need to add a Listen thing in the the httpd.config file or whatever that is for apache? Thanks,

g1smd

9:46 am on Feb 3, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



You only need to open port 80 on the router if you want to accept connections from the outside world.

andrewsmd

1:55 pm on Feb 3, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I got it. I had to edit the host file like you said. I just didn't know what that was. Thanks for all of your help.

jdMorgan

3:51 pm on Feb 3, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Yes, you don't want to open port 80 in your router's firewall unless you've taken steps to secure your LAN and are ready to accept server requests from the Web.

When I posted "firewall on your server" above, I was attempting to differentiate that firewall from any firewall in the router. I intended to refer to a software firewall in the server machine itself. Sorry if this caused any confusion.

Jim

andrewsmd

4:05 pm on Feb 3, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



No problem. You both were great help. Thanks,