Hi, I set up a really simple website about a year ago on a computer running ubuntu on my home network. I have a static IP address on my home network, and my router is set up to send requests over port 80 to this computer. I've purchased a domain name through godaddy which we can call xyz.com. This is set to my home network's external IP address. My question is exactly what the "ServerName" in httpd.conf does. It makes sense to me that if somebody types (URL address blocked: See forum rules) into their browser, it should send them to some DNS server where godaddy has tied my network's external IP address to that host name. So, the http request should be directed to my network's external IP, and from there it would be redirected to the computer within my network. So, what is the purpose of "ServerName"? And what should I be setting it to? Should I be setting it to "computerName.xyz.com"?
See ServerName is a what is showed you name your Server like Moon Star etc, but really it is visible mostly when you see an server error, like 404, 500 etc,
Does "ServerName" do some sort of redirection? I noticed that if I attempt to just type in the IP address of my machine into a browser window, it redirects for some reason to my server name. What is causing this to happen? Is it this "ServerName" setting, or is it some other setting?
well, yes but if you need more information on it you refer to Apache page for serverName here : http://httpd.apache.org/docs/2.0/mod/core.html#servername
Thanks for the link. It says "this is used when creating redirection URLs". So, does this redirect an IP address to a host name or a host name to an IP address?
So, it's actually redirecting an incoming request to the domain name given? Or it's merely providing the name that's tied to the IP address back, so that the browser can show the name? It just seems weird to me that it would redirect an IP address to a site name. If somebody comes to my computer to access a web page, I want to send back that web page, I don't want to redirect them somewhere else. I guess I just don't understand.