Anyway, after changing the domain name Bugzilla stopped working. I had just gone through hell a couple days earlier setting it up. Good thing I have root access to my server... I had to actually modify the httpd.conf to give the bugzilla directory the proper permissions. I hate configuring Apache so I just copy-pasted from some web site. Well, now it wasn't working and I had to find out why.
When your CGI script doesn't work, what happens is you get an Internal 500 error in your browser. This is useless and tells you nothing. If you're lucky, you'll have access to your site's error log. But even if you do, access is useless if you don't know where the error log is LOCATED. The problem with web servers that run on Linux is that every installation seems to be set up differently. You can try Googling to find the path to a certain file, but most of the time the path you find just won't work.
On my server, the web server error log is located at /usr/local/apache/logs/error_log. You can view the last few lines of this gigantic log file with this command:
$~ tail /usr/local/apache/logs/error_log
Doing this, I discovered the error:
/home/bodybugz/public_html/bugs/.htaccess: RewriteEngine not allowed here
Evidently the RewriteEngine needs to be turned on in the bugs directory (which is where Bugzilla is installed). I didn't know why at the time, but in hindsight the .htaccess file contains this line:
RewriteEngine on
It seems that RewriteEngine is off by default, and needs to be specifically turned on for this directory. Luckily, I knew by Googling that I needed to edit my httpd.conf, and the path to this is /etc/httpd/conf/httpd.conf.
Here is what my configuration was:
<Directory /home/bodybugz/public_html/bugs>
AddHandler cgi-script .cgi
Options +Indexes +ExecCGI
DirectoryIndex index.cgi
AllowOverride Limit
</Directory>
And here is what I had to change it to:
<Directory /home/bodybugz/public_html/bugs>
AddHandler cgi-script .cgi
Options +Indexes +ExecCGI
DirectoryIndex index.cgi
AllowOverride All
</Directory>
This allowed the .htaccess to override the default server setting for RewriteEngine.
Don't forget to restart Apache whenever you change the httpd.conf.
$~ service httpd restart
Conclusion: No mere mortal can possibly comprehend all the complexities of Apache configuration. Don't attempt it unless you want your head to explode.