PDA

View Full Version : Apache Help


Felix_MC
06-10-2007, 07:55 PM
I've got a PPC G4 eMac, with Tiger running on it, and cable internet connection, that I want to set as a server with appache. Yesterday I followed a guide on the o'reilley website about how to set it up. So I turned web sharing on, modified the file in /library/webserver/documents/index.html.en
I changed the html so that it has a black background, it has a thunder sound in the background when you first open the page, and it has a banner (that I made in phptoshop and saved as .gif) saying that the website is currently under construction. I looked at my website address in sharing (which is my IP by default) and clicked on it, and the page opened in safari, working perfecty. Then I told my partner about it, planning how to transfer our website from a web hoster we've been using for a year now, to my new-set-up server. I gave him the url that was provided in the system preferences/sharing, but when he opened, he said, that the web browser said that the server didn't exist. He was on a Windows, and tried to open it with Firefox. Then he tried IE and then Netscape, but he said none worked. I checked over everything, make sure that everything was on, but I found no problem. Does anyone know what might be wrong, why only my computer reads the page?:confused: BTW, for those of you who want to test it to check, my page is ssuposely here: http://192.168.0.187 (http://192.168.0.197)
Which remind me of another thing. I could have sworen that about a month ago, when I last checked my IP address, is was ending in .32, not .187. And yesterday, when I first set up the server, and earlier today, I know for sure it was ending in .180, not .187.
My computer hasnt been turned off since yesterday, or lost internet conncection or even go into stand-by. Does anyone know whay my IP keeps changing?:confused:

cwtnospam
06-10-2007, 08:27 PM
BTW, for those of you who want to test it to check, my page is ssuposely here: http://192.168.0.187 (http://192.168.0.197)
You're behind a router, so you need to use the router's WAN address and you need to set the router up to port forward to your local address (the 192.168.0.xxx). You can get the WAN address from the router's setup page, or you can go to http://whatismyip.com/

roncross@cox.net
06-10-2007, 08:51 PM
In addition, some ISP block port 80.

This from the Apache Server FAQ:
Why can I access my website from the server or from my local network, but I can't access it from elsewhere on the Internet?


There are many possible reasons for this, and almost all of them are related to the configuration of your network, not the configuration of the Apache HTTP Server. One of the most common problems is that a firewall blocks access to the default HTTP port 80. In particular, many consumer ISPs block access to this port. You can see if this is the case by changing any Port and Listen directives in httpd.conf to use port 8000 and then request your site using http://yourhost.example.com:8000/. (Of course, a very restrictive firewall may block this port as well.)

tw
06-10-2007, 11:35 PM
it's also possible that your network is assigning your address dynamically - that means it will change periodically (when you restart or otherwise disconnect your machine from the network). this is actually fairly common - DHCP connections do this automatically, and those are used extensively by university and corporate networks. that would make it a bear for you - you need a static IP if you're going to run an accessible server (at least so far as I understand it...)

roncross@cox.net
06-11-2007, 08:35 AM
This is another reason to think about hosting your site with a web hosting company. However, it's fairly easy to give yourself a static IP. You can go into the "System Preferences" > Network > click on TCP/IP button. Select Configure Manually and put all the information in the blank text field. The IP address could be something like 192.168.1.xxx where xxx could be from 0 to 255, although I would stay away from 0 and 255 and start with 10 or something like that. You can get the other information from your router. Make sure to put in the correct DNS Servers information from your router; there maybe more than one server so separate them by hitting return.

tw
06-11-2007, 10:47 AM
However, it's fairly easy to give yourself a static IP...

let me just add (to save headaches) that this would be a Really Bad Idea if you're part of someone else's network and they are assigning addresses dynamically. if you're on a network, check with the network administrators first to see if they have a procedure for granting a static IP.