# Bugzilla & Apache2, installtion troubles, Guru wanted !

## Crimson Rider

Hi guys,

Yet again I am running into more troubles then I can comprehand. And yet again I turn to you.

I am attempting to install Bugzilla. I have this Gentoo box, a powerfull box at that, pentium IV something with a Gig of Ram. I properly installed MySQL on that, Apache 2 and now I am trying to get it to run Bugzilla.

That is where my problems start. First of all, the manual speaks of using httpd.conf, a file that is (??) no longer (??) used. I fiddle around some more and find a guide, I do what is told, set the directory directive succesfully run checksetup.pl 2 times and for my troubles I get, and keep getting :

```
Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, root@localhost and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

Apache/2.0.52 (Gentoo/Linux) Server at 127.0.0.1 Port 80
```

Does anyone know what to do ? Please, some help would be highly appreciated.

----------

## rex123

Can't help all that much, but...

httpd.conf is the default name of the apache configuration file. Gentoo uses /etc/apache2/conf/apache2.conf, which includes commonapache2.conf (and files in modules.d). So the best place to make the modifications is commonapache2.conf.

The server error log (which will contain useful info) is, by default, at /var/log/apache/error_log.

Unfortunately I can't go any further, because I have never set up bugzilla :(

Hope that helps anyway.

----------

## Crimson Rider

I've set up more then one apache server, heck, I do that for a living.

Can't figure out this thing tough, thanx for the suggestion.

----------

## Boris27

Did you emerge bugzilla or install it by hand?

Emerge takes care of some of the changed filenames. Maybe that helps.

----------

## Crimson Rider

emerged

to no avail  :Sad: 

----------

## rex123

Might it be a permissions problem? See http://article.gmane.org/gmane.comp.mozilla.devel.webtools/7185 for an example.

What does the error log say?

----------

## Crimson Rider

```

[Tue Nov 30 16:02:22 2004] [alert] [client 192.168.200.73] /var/www/localhost/htdocs/bugzilla/.htaccess: Options not allowed here

```

while the statement is

```

<Directory /var/www/localhost/htdocs/bugzilla>

    AllowOverride Limit

    Options +ExecCGI +FollowSymlinks

</Directory>

```

----------

## rex123

"AllowOverride Limit" disallows overriding of Options in .htaccess. Try changing to "AllowOverride All" or "AllowOverride Limit Options". [Or take the Options line out of .htaccess]

----------

## Crimson Rider

Thanx for the help so far, but still haven't got it working.

Changing the configuration to this :

```

<Directory /var/www/localhost/htdocs/bugzilla>

    AllowOverride All

    Options +ExecCGI +FollowSymlinks

</Directory>

```

Gives this error :

```

[Wed Dec 01 10:45:13 2004] [notice] Digest: done

[Wed Dec 01 10:45:14 2004] [notice] Apache/2.0.52 (Gentoo/Linux) configured -- resuming normal operations

[Wed Dec 01 10:45:19 2004] [alert] [client 192.168.200.73] /var/www/localhost/htdocs/bugzilla/.htaccess: AllowOverride not allowed here

[Wed Dec 01 10:45:19 2004] [error] [client 192.168.200.73] File does not exist: /var/www/localhost/htdocs/favicon.ico

```

----------

## rex123

Looks like you've put that code into the .htaccess file, when it should be in the main apache config file.

To avoid the confusion, maybe the best thing would be to remove the .htaccess altogether, and put the appropriate config code into the config file (commonapache.conf) only.

The errors are telling you (it seems) that you are trying to put directives into .htaccess that are not allowed.

The command that affects what is allowed in .htaccess is AllowOverride. This command itself is only allowed in the main config file, not in any .htaccess files.

Sorry if this is really confusing.

----------

## Crimson Rider

Buddy, you have no idea how confused I am getting. But thanx a lot for the help so far.

In the mean with the help of the Apache Powers that Be, I have managed to create a working WebDAV installation. However, still nothing on the bugzilla thing.

My config file is now like this 

```
[Mon Dec 06 11:56:09 2004] [alert] [client 192.168.200.73] /var/www/localhost/htdocs/bugzilla/.htaccess: Options not allowed here

[Mon Dec 06 11:56:09 2004] [error] [client 192.168.200.73] File does not exist: /var/www/localhost/htdocs/favicon.ico

```

And I get a 500 code with the following error log

[Mon Dec 06 11:56:09 2004] [alert] [client 192.168.200.73] /var/www/localhost/htdocs/bugzilla/.htaccess: Options not allowed here

[Mon Dec 06 11:56:09 2004] [error] [client 192.168.200.73] File does not exist: /var/www/localhost/htdocs/favicon.ico

[/code]

Is there something I am not getting at all here ?

----------

## rex123

I think that the problem is that you have a file called /var/www/localhost/htdocs/bugzilla/.htaccess, which contains an Options line. This won't work.

Maybe post the output of cat /var/www/localhost/htdocs/bugzilla/.htaccess, to make sure.

Apache .htaccess files override some of the configuration in the main config files, but they are restricted so users can't do bad things. Since you are the system admin, you don't need to use them at all. You could remove the .htaccess file altogether, then fix up your main apache config file so it has all the options you need.

You said you have

```
<Directory /var/www/localhost/htdocs/bugzilla> 

    AllowOverride Limit 

    Options +ExecCGI +FollowSymlinks 

</Directory> 

```

somewhere. What file is this code in?

----------

## Crimson Rider

it's in

/etc/apache2/conf/commonapache2.conf

----------

## Crimson Rider

and here's .htaccess

```

Order Allow,Deny

Options +ExecCGI +FollowSymLinks

AllowOverride Limit

```

It's the code that was in the bugzilla installtion, and you say I can move this to the apache2 conf file ?

----------

## rex123

Just delete the .htaccess file, then. You can't use AllowOverride in .htaccess; the Options line is identical to the one in commonapache2.conf, so it's redundant. Anyway only the Limit option is overridable (because of AllowOverride Limit in commonapache2.conf).

The Allow,Deny order isn't doing anything because there's nobody being allowed/denied. But you can put this into commonapache2.conf anyway.

So... remove .htaccess and you should be fine.

----------

## Crimson Rider

okay, now I am confused.

I remove .htaccess from /var/www/localhost/htdocs/bugzilla and /var/www/localhost/htdocs/ gives a 500 error, i put back the htaccess file, and /var/www/localhost/htdocs/ displays correctly again.

?????

What the ?

I am pondering throwing the complete installtion away and starting over.

----------

## adaptr

No, what he said was that the AllowOverride directive is not allowed in an .htaccess file - which is true.

But that snippet as posted (ignoring the AllowOverride, which shouldn't be in there) makes sure that everybody is denied access to the directory.

Order Allow,Deny without any Allow From directives after it  means Deny From All.

Since you "configure Apache for a living", I would assume you knew this.

 *rex123 wrote:*   

> The Allow,Deny order isn't doing anything because there's nobody being allowed/denied

 

Ouch... go read the manual, dude.

Like I said: Deny From All is implicit here...

http://httpd.apache.org/docs-2.0/mod/mod_access.html#order

----------

## Crimson Rider

YES !!!

I got it working.

Did you know that if you move .htaccess to your / it get's read by apache ??

----------

## adaptr

FS root or DocumentRoot ?

If the latter, yes, of course.

If the first, serious apache misconfiguration.

----------

## Crimson Rider

I configure lot's of things to get my daily bread. Point of fact is however, that it's secondary to my usual work as a coder. 

Thanx for the help.

----------

## Crimson Rider

Filesystem root, somehow it's all messed up, then again, I am only testing this to see if I can get apache to be more then my basic PHP/HTML server.

----------

## rex123

 *adaptr wrote:*   

>  *rex123 wrote:*   The Allow,Deny order isn't doing anything because there's nobody being allowed/denied 
> 
> Ouch... go read the manual, dude.
> 
> 

 

Sorry!

----------

## rex123

What I should have done at the start was just link to this:

http://httpd.apache.org/docs/howto/htaccess.html

It clearly explains everything that has been mentioned in this thread.

To prevent .htaccess being read in the filesystem root, use something like this [adaptr, please correct if wrong :-) ]

```
<Directory />

  AllowOverride None

</Directory>

```

----------

## Crimson Rider

Well, not one to claim to know anything let alone everything, I am checking out that link now. Thanx

----------

## adaptr

That is, in fact, what should by default be set in the basic apache config.

Then you allow both access and htaccess presence by configuring specific directories afterwards.

----------

