LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices



Reply
 
Search this Thread
Old 09-08-2009, 11:31 PM   #1
qhhatman
LQ Newbie
 
Registered: Oct 2008
Posts: 19

Rep: Reputation: 0
Question Bugzilla3 Error 404 Not Found problem


I'm using the Ubuntu 9.04 (Jaunty jackalope) server and am trying to get bugzilla running for internal use only. It seems that everything loaded properly and mysql was setup properly. But when I try to run bugzilla3 from firefox (I'm just doing http://myipaddress/bugzilla) I get the 404 Not Found error that says "The requested URL /usr/lib/cgi-bin/bugzilla3/index.cgi was not found on this server." That directory does exist and index.cgi is there. I'm new to apache things so I may be missing something there? I found that if I do http://myipaddress/cgi-bin/bugzilla3/index.cgi in firefox then bugzilla runs but without a skin/template (not nice looking at all with no formatting). When that worked I also tried changing /var/www/bugzilla/index.html to reference /cgi-bin/bugzilla3/index.cgi instead of /usr/lib/cgi-bin/bugzilla3/index.cgi as it was initially but that still resulted in the same 404 error mentioned above. Does anybody know what is going on here. I suspect this is just me being a newbie, but I'd appreciate some guidance. I've searched loads of forums and haven't found any solutions yet.
 
Old 09-09-2009, 12:40 AM   #2
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora, Lubuntu, FreeBSD
Posts: 3,930
Blog Entries: 5

Rep: Reputation: Disabled
Check the output of:
Code:
# grep '^ *CustomLog' httpd.conf
Tail the file that's specified (preceded by ServerRoot, if it's a relative path), e.g.:
Code:
# tail -f /var/log/httpd-access_log
Then attempt to view the page again. What does the error message in the access log say exactly?

I'm not sure, but it sounds like you may need to set up a ScriptAlias for "bugzilla".

Last edited by anomie; 09-09-2009 at 12:41 AM.
 
Old 09-09-2009, 03:32 AM   #3
qhhatman
LQ Newbie
 
Registered: Oct 2008
Posts: 19

Original Poster
Rep: Reputation: 0
Thanks for the help anomie. I don't actually have a httpd.conf file. Ubuntu seems to have changed how they do that. Instead I looked in the sites-available directory (under apache2) and greped on bugzilla3.conf. There is no line with CustomLog in that file. I edited the file looking for variations on that name. There was nothing. So I went to /var/log/apache2 and tailed access.log which showed me my most recent attempt to load the page. The exact line in the log is:
192.168.1.2 - - [09/Sep/2009:15:10:27 +0800] "GET /usr/lib/cgi-bin/bugzilla3/index.cgi HTTP/1.1" 404 283 "-" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.13) Gecko/2009080315 Ubuntu/9.04 (jaunty) Firefox/3.0.13"

In my bugzilla3.conf file it does have the following:
<Directory "/usr/lib/cgi-bin/bugzilla3">
AddHandler cgi-script cgi
DirectoryIndex index.cgi
Options +Indexes +ExecCGI -MultiViews +SymLinksIfOwnerMatch +FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>

I thought that top line is what let me enter http:/serveripaddress/cgi-bin/bugzilla3/index.cgi and have it work (with index.cgi actually under /usr/lib...). But I'm an apache weanie so may be completely wrong about that.

Based on your thoughts I also tried adding a ScriptAlias to the bugzilla3.conf file (and restarting apache) but that didn't seem to do anything. It is certainly possible that I didn't do the ScriptAlias correctly as this was the first time I've learned of this directive.

Any other thoughts you might have on this problem will be appreciated!
 
Old 09-09-2009, 05:51 PM   #4
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora, Lubuntu, FreeBSD
Posts: 3,930
Blog Entries: 5

Rep: Reputation: Disabled
Quote:
Originally Posted by qhhatman
I don't actually have a httpd.conf file. Ubuntu seems to have changed how they do that. Instead I looked in the sites-available directory (under apache2) and greped on bugzilla3.conf.
Those crazy Ubuntu devs. (I should have fired up my Ubuntu laptop before suggesting where to look for httpd's config...)

Quote:
Originally Posted by qhhatman
I went to /var/log/apache2 and tailed access.log which showed me my most recent attempt to load the page. The exact line in the log is:
Code:
192.168.1.2 - - [09/Sep/2009:15:10:27 +0800] "GET /usr/lib/cgi-bin/bugzilla3/index.cgi HTTP/1.1" 404 283 "-" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.13) Gecko/2009080315 Ubuntu/9.04 (jaunty) Firefox/3.0.13"
Sure enough, that's a HTTP 404. Could you copy and paste the exact path from that log and then run in your terminal:
Code:
$ file /usr/lib/cgi-bin/bugzilla3/index.cgi
You're doubly sure it is there?

What happens if you (temporarily) rename the index.cgi file to index.cgi.foo? Does your browser show you a directory listing? (It should, based on your Directory setup.)
 
Old 09-10-2009, 01:40 AM   #5
qhhatman
LQ Newbie
 
Registered: Oct 2008
Posts: 19

Original Poster
Rep: Reputation: 0
Result of the file command:
/usr/lib/cgi-bin/bugzilla3/index.cgi: a /usr/bin/perl -wT script text executable

So it really is at that path despite the log entry.

When I rename index.cgi I get the same result, the 404 error, because then it really isn't there.

Previously I mentioned that if if I do http://myipaddress/cgi-bin/bugzilla3/index.cgi in firefox then bugzilla runs but without a skin/template (not nice looking at all with no formatting). While experimenting with all of this I tried creating an account from there. Nothing appeared on the screen indicating success or failure, but the log, interestingly, indicated that the call to the createaccount.cgi succeeded but no skins could be found. Here's the log entires:

192.168.1.2 - - [09/Sep/2009:15:46:42 +0800] "GET /cgi-bin/bugzilla3/createaccount.cgi HTTP/1.1" 200 1641 "http://192.168.1.30/cgi-bin/bugzilla3/index.cgi" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.13) Gecko/2009080315 Ubuntu/9.04 (jaunty) Firefox/3.0.13"
192.168.1.2 - - [09/Sep/2009:15:46:43 +0800] "GET /bugzilla3/skins/custom/global.css HTTP/1.1" 404 283 "http://192.168.1.30/cgi-bin/bugzilla3/createaccount.cgi" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.13) Gecko/2009080315 Ubuntu/9.04 (jaunty) Firefox/3.0.13"
192.168.1.2 - - [09/Sep/2009:15:46:43 +0800] "GET /bugzilla3/skins/standard/global.css HTTP/1.1" 404 283 "http://192.168.1.30/cgi-bin/bugzilla3/createaccount.cgi" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.13) Gecko/2009080315 Ubuntu/9.04 (jaunty) Firefox/3.0.13"
192.168.1.2 - - [09/Sep/2009:15:46:43 +0800] "GET /bugzilla3/skins/contrib/Dusk/global.css HTTP/1.1" 404 287 "http://192.168.1.30/cgi-bin/bugzilla3/createaccount.cgi" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.13) Gecko/2009080315 Ubuntu/9.04 (jaunty) Firefox/3.0.13"

So from this it looks like it found some alias somewhere that didn't add the /usr/lib in front of /cgi-bin. I'm not sure why it happened there but won't do the same from my initial browser entry.
 
Old 09-10-2009, 11:52 AM   #6
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora, Lubuntu, FreeBSD
Posts: 3,930
Blog Entries: 5

Rep: Reputation: Disabled
For grins, I would try:
Code:
ScriptAlias /bugzilla "/usr/lib/cgi-bin/bugzilla3"
Reload Apache and then try to visit: http ://your.host/bugzilla

If that doesn't work, let's see your entire Apache configuration.
 
Old 09-10-2009, 09:02 PM   #7
qhhatman
LQ Newbie
 
Registered: Oct 2008
Posts: 19

Original Poster
Rep: Reputation: 0
that didn't work either. By the way, I do have other sites that I've successfully run from this server, though none of them are setup to run .cgi's from another directory path like bugzilla does. I really appreciate the continued help anomie! It sure is nice to have knowledgeable people like yourself to help us greenhorns.

Here is my full bugzilla3.conf file:
<VirtualHost *:80>

ScriptAlias /bugzilla "/usr/lib/cgi-bin/bugzilla3"

<Directory "/usr/share/bugzilla3/web">
AllowOverride none
Order allow,deny
Allow from all
</Directory>

<Directory "/usr/lib/cgi-bin/bugzilla3">
AddHandler cgi-script cgi
DirectoryIndex index.cgi
Options +Indexes +ExecCGI -MultiViews +SymLinksIfOwnerMatch +FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>

<Directory "/var/lib/bugzilla3/data">
Options FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>

<Directory "/usr/lib/cgi-bin/bugzilla3">
AddHandler cgi-script cgi
DirectoryIndex index.cgi
Options +Indexes +ExecCGI -MultiViews +SymLinksIfOwnerMatch +FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>

<Directory "/var/lib/bugzilla3/data">
Options FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>

</VirtualHost>
 
Old 09-11-2009, 04:59 PM   #8
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora, Lubuntu, FreeBSD
Posts: 3,930
Blog Entries: 5

Rep: Reputation: Disabled
Quote:
Originally Posted by qhhatman
It sure is nice to have knowledgeable people like yourself to help us greenhorns.
Well, don't get too far ahead of yourself. I haven't actually helped fix anything yet.

Quote:
Originally Posted by qhhatman
Code:
        <Directory "/usr/lib/cgi-bin/bugzilla3">
                AddHandler cgi-script cgi
                DirectoryIndex index.cgi
                Options +Indexes +ExecCGI -MultiViews +SymLinksIfOwnerMatch +FollowSymLinks
                AllowOverride None
                Order allow,deny
                Allow from all
        </Directory>
That section got my attention. Is it possible /usr/lib/cgi-bin/bugzilla3 is a symlink (or some of its files are symlinks)?

Try:
Code:
$ ls -ld /usr/lib/cgi-bin/bugzilla3
(do not use a trailing slash)

Symlinks have a 'l' in the file type (i.e. first byte) position of a long listing. They also visually look different than the real file. Example:
Code:
lrwxrwxrwx. 1 mrbig mrbig 5 2009-09-11 15:54 home2 -> /home
If you find this to be the case with /usr/lib/cgi-bin/bugzilla3 or any of its parents - /usr, /usr/lib, /usr/lib/cgi-bin - then I would remove +SymLinksIfOwnerMatch from your Options directive and try again. It may be that ownership is messed up, and this would be a quick way to test that.

-------

I'd add that it would be very helpful if you added a -
Code:
LogLevel info
- directive to your Apache configuration. Then, check Apache's error log after attempting to view the page again. That may yield some useful clues.

-------

One more thing: remember that you need to restart (gracefully or otherwise) Apache web server after making configuration changes for them to take effect.

Last edited by anomie; 09-11-2009 at 05:01 PM.
 
Old 09-13-2009, 10:45 PM   #9
qhhatman
LQ Newbie
 
Registered: Oct 2008
Posts: 19

Original Poster
Rep: Reputation: 0
Success!
I'm not sure why it didn't work last Friday given the changes. But today I added the LogLevel info command (after checking that the directory's were not links, which they are not) and restarted apache. I had done a graceful restart last Friday but today I just did an "/usr/sbin/apache2ctl -k restart". I also cleared the cache on FF before loading bugzilla. Whatever happened today it worked and I think the AliasScript you advised me about is what did it. Now I just have to get the skins to work. I see from the page source it is looking for the css files in /bugzilla3/skins/standard/*.css, so hopefully I can just add an alias in my bugzilla3.conf file and get the skins to work properly.

Thanks for your help anomie, I appreciate it!
 
  


Reply

Tags
bugzilla, error, found, jaunty


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
404 not found? jabos Mandriva 6 06-21-2007 12:48 PM
Apache error: 404 Not Found, why? cucolin@ Ubuntu 3 08-14-2006 12:01 PM
apt-get 404 Not Found error Steve Riley Ubuntu 3 06-21-2006 07:31 PM
Possible Apache exploit / 404 NOT FOUND rioguia Linux - Security 5 01-03-2006 04:07 PM
404 page not found Darthomir General 2 03-30-2004 10:29 PM


All times are GMT -5. The time now is 04:01 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration