Hi, I purchased Peter Harrison's wonderful book Linux Home Networking II to get my personal Web site on my Linux box working. First, some background and I'll try to make it brief: my computer running Red Hat Linux 9 with Apache 2.0 is one of a bunch of computers that are behind a firewalled Linksys router connected to a cable modem. My cable ISP gives me a static IP address as the outside address for my whole network, and I have purchased a fully-qualified domain name from another company that I have linked to my IP address. I also use port forwarding to direct any requests to my Web server to port 80 on my Linux computer.
My Web pages are located in my Linux machine's /var/www/html directory, and after setting everything up following the instructions in Peter's book I have had no trouble in accessing my main site from outside the network. Specifically, my domain name is McCorduck.ws and pointing a browser to http://McCorduck.ws always brings up the index.html file in the above directory. (I thought I also set it up so that my site ought to accept inquiries to http://www.McCorduck.ws; that doesn't work yet, but that's not something I'm too worried about now.) This index.html file redirects to another page which has sound and graphics, and again there are never any problems calling up this page or any of its elements.
Under the /var/www/html directory I have a subdirectory named "football" with its own index.html file, intending this to be something like a separate site. When I try to access this "site," however (specifically, when I point a browser to http://McCorduck.ws/football), I can never connect. If I give the address as http://McCorduck.ws/football/index.html or if try to access any of the other pages of this site, though, it does work.
Interestingly, on the page that my main index.html pages redirects to, I have a link to this other "site" which I give as "http://McCorduck.ws/football". But when I click on it, I get a "cannot find server" error message, or, tellingly, if I'm using the Opera browser I get an error window reading "Could not locate remote server" and titled "http://localhost.localdomain/football/". Now my Linux machine originally had the default hostname "localhost" and domain name "localdomain," but I had since changed them using the "localhost -v" and "domainname -v" commands and put the new names in my zone files as directed in the Home Networking book. Also interestingly, though, when my Linux computer goes through its initial bootup process, I see it still gives the name and domain of the computer as "localhost.localdomain" but when it gets to the Red Hat login screen, it always says "Welcome to edsgate.mccorduck.ws", i.e. with the name of both the computer (edsgate) and my domain (mccorduck.ws) that I had changed it to.
In trying to resolve this problem, I came upon the section "File Permissions and Apache" on p. 97 of Linux Home Networking II. It seemed to be addressing my problem, so I tried the script on p. 158 that Peter refers to. I wasn't sure where to save the script, but from the indications I put it in the /tmp directory. When I ran it, however, I got the error message "bash: ./fix-www-perms.sh: Permission denied". I created the file as root and I got this message both when I tried to run it as root and also as my regular user name, my reasoning being that some of the Web pages I have in /var/www/html were created by this user (indeed, I'm not sure, but I may have originally created the whole "football" directory as this user, but I've since changed its ownership back to root). I also tried substituting what look to me like grave accents around "find $1" in the first line of the script with single quotation marks, but that made no difference.
Any help or advice for this problem would be appreciated. Peter, especially, if you monitor these forums, please let me know what you think. Thanks in advance.
Department of English
State University of New York College at Cortland