简体   繁体   中英

Error in getting JS and CSS files in Bugzilla 5.0.3

I have configured the Bugzilla on centos 7 and it is working fine except it is fail to GET the JS and CSS files.

I have followed the instructions from here .

I have Configured Apache to host Bugzilla installation as follow:

Note: I have httpd service running on port 88.

#/etc/httpd/conf.d/bugzilla.conf
<VirtualHost *:88>
DocumentRoot /var/www/html/bugzilla/
</VirtualHost>
<Directory /var/www/html/bugzilla>
AddHandler cgi-script .cgi
Options +Indexes +ExecCGI
DirectoryIndex index.cgi
AllowOverride Limit FileInfo Indexes
</Directory>

When I am accessing the Bugzilla from chrome browser.I am getting view shown in below image.

chrome 浏览器上的 Bugzilla

I have crosschecked for the JS and CSS files and files are there.What I am missing here?

I had the same problem, it was due to Apache 2.4 not serving css or js files. To confirm this, check for "client denied by server configuration" errors for css or js files in your /var/log/apache2/error.log file.

What fixed it for me was to remove all .htaccess files in subdirectories, then rerun ./checksetup.pl to regenerate them, as described in the 5.0.2 release notes ( https://www.bugzilla.org/releases/5.0.2/release-notes.html )

find . -mindepth 2 -name .htaccess -exec rm -f {} \;
./checksetup.pl

I had such problem. Here is the solution I did. The OS was CentOS 7.

  1. I saw some errors in /var/log/httpd/error_log
/bugzilla/data/.htaccess: Require not allowed here /bugzilla/data/assets/.htaccess: Require not allowed here
  1. I deleted the lines containing Require

For me, I was using Bugzilla 5.0.6. When I looked at the Apache logs, it was saying

  1. C:/bugzilla/data/.htaccess: Invalid command 'Deny', perhaps misspelled or defined by a module not included in the server configuration, referer: http://localhost/bugzilla/
  2. C:/bugzilla/data/assets/.htaccess: Invalid command 'Allow', perhaps misspelled or defined by a module not included in the server configuration, referer: http://localhost/bugzilla/

So, what I did is just in these two .htaccess files, I changed the Deny from all to Require all denied and Allow from all to Require all granted .

Issue on Github

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM