LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   Apache and/or Bugzilla issue (http://www.linuxquestions.org/questions/linux-software-2/apache-and-or-bugzilla-issue-872515/)

macombej 04-01-2011 10:52 PM

Apache and/or Bugzilla issue
 
I loaded CentOS 5.5, Apache and Bugzilla with all the trimmings.

My checksetup.pl finishes with no errors. I think the issue is on the Apache side of the equation.

I can surf to localhost/test/index.html but cannot surf to localhost/bugzilla/index.html.

I have commented out my <Directory> calls for /var/www/html/bugzilla. restarted everything, cleared browser cash, validated that the test directory, bugzilla directory and both index.html files have the same settings.

I can file:// to both index.html files but can't http:// to the bugzilla version. I get a 403 error.

What can cause Apache to ignore a directory in this case?

tronayne 04-02-2011 07:23 AM

In your /etc/httpd directory (where httpd.conf lives), see if you have an extra subdirectory. If you do, add a file, httpd-bugzilla.conf in the extra directory with this content:
Code:

# Bugzilla
<Directory "/srv/httpd/htdocs/bugzilla">
        AddHandler cgi-script .cgi
        Options +Indexes +ExecCGI
        DirectoryIndex index.cgi
        AllowOverride Limit
</Directory>

The "/srv/httpd/htdocs/bugzilla" is where your Bugzilla directory is in your server tree. It can be either a symbolic link or the actual directory (mine is the actual directory in /var/www/htdocs/bugzilla, yours may vary but it's the same idea).

You don't really want to use an absolute path here, "srv" is a token that Apache uses to determine the path.

Now, if you have /etc/httpd/extra, add the following at the end of /etc/httpd/httpd.conf
Code:

# Uncomment the following line to enable Bugzilla:
#
Include /etc/httpd/extra/httpd-bugzilla.conf

If you do not have /etc/httpd/extra, you can simply add the above "Directory" lines to end of /etc/httpd/httpd.conf.

Stop the server, start the server and see if you've got it.

Just in case, make sure that your DirectoryIndex section looks like this (I've added PHP to it)
Code:

#
# DirectoryIndex: sets the file that Apache will serve if a directory
# is requested.
#
<IfModule dir_module>
    DirectoryIndex index.html index.php
</IfModule>

I assume you have a web page that you are able to access? If you do and can't, you'll need to solve that first. This is where a fixed-IP address for your box comes in handy; e.g., my server is fixed-IP at 192.168.1.10 and, in /etc/httpd/httpd.conf the "Listen" section looks like this:
Code:

#
# Listen: Allows you to bind Apache to specific IP addresses and/or
# ports, instead of the default. See also the <VirtualHost>
# directive.
#
# Change this to Listen on specific IP addresses as shown below to
# prevent Apache from glomming onto all bound IP addresses.
#
#Listen 12.34.56.78:80
#Listen 80
Listen 192.168.1.10:80

Works just fine, that. But, then so does VirtualHost or simply leaving it to "Listen 80." Up to you.

Bugzilla has always been just a little tricky to get going but the above seems to work pretty well.

Hope this helps some.

bathory 04-02-2011 08:36 AM

Hi,

Since you're running Centos I guess it's a SELinux permissions problem.

Regards

macombej 04-02-2011 09:47 PM

Bathory, good call. I shut off SELINUX enforcement and the folder popped right up. Evidently the checksetup.pl inserts a configuration in SELINUX for bugzilla. If anyone knows what might fix this configuration, please post. Otherwise, I will hopefully figure it out and post it here.

bathory 04-03-2011 03:10 AM

Hi,

You can use the following to allow apache use the bugzilla directory (use the actual path to the installed bugzilla):
Code:

chcon -R -h -t httpd_sys_content_t /path/to/bugzilla
Regards


All times are GMT -5. The time now is 12:02 AM.