In search of the Holy Grail

UNIX/Linux Network Administration - Rich Simms
Locked
User avatar
Rich Simms
Posts: 2421
Joined: Sat Jan 16, 2010 5:47 pm
Contact:

In search of the Holy Grail

Post by Rich Simms » Sat May 29, 2010 5:20 pm

I noticed after grading Lab 10 that very few students were successful publishing the holy-grail.rivendell web site. I could tell by looking at the /www/holy-grail/transfer_log and /www/holy-grail/error_log files.

The root cause was usually the DNS being configured to resolve holy-grail.rivendell to an IP address that was different than the one defined as the Apache virtual host. That is, the IP address for Elrond in /var/named/db.rivendell was not the address used in the NameVirtualHost & Virtual Host directives in httpd.conf.

To compare the results of various configurations people used see: http://simms-teach.com/docs/cis192/apac ... onfigs.pdf
Green indicates correct configurations and all web sites can be published. Red indicates incorrect configurations which don't allow some sites to be published.

Basically it works like this:

Configure DNS to resolve names to whatever you want to be the public IP address for your web server. This could be the interface on either the Shire or Rivendell side depending who you want to publish to.

When Apache gets the request for a page it will look at the URL:
  • If a ~user account is specified on the URL it will publish the default page in that user's public_html directory.
  • If a NameVirtualHost is defined for the interface the request arrived on, then Apache will publish the site whose ServerName matches the URL. If no match, then it will use the first web site for that VirtualHost (which is the remus-farm.rivendell site).
  • If there is no ~user or the interface that gets the request has no VirtualHosts defined then it will publish whatever default page is in /www/var/html/. Since we didn't put anything there all you would see is the Apache test page.
- Rich

User avatar
EdwinOrdaz
Posts: 17
Joined: Sun Feb 14, 2010 5:34 am

Re: In search of the Holy Grail

Post by EdwinOrdaz » Sat May 29, 2010 5:47 pm

Is this basically what happened to me? It was the only time I received 25/30 on a Lab and I have those logs to blame. :D I now realized I should have redone the command to show the logs after you helped me with the holy-grail/remus-farm sites, Rich. I guess I just blanked out and forgot to do so (since I copied/pasted the results before the sites were up). Oh well, at least I got most of the points, lol. Thanks again for helping me with that httpd.conf file though, Rich! :)

Locked

Return to “CIS 192AB - Spring 2010”