CSS、Javascriptが表示されない

847 views
Skip to first unread message

kruga...@gmail.com

unread,
Feb 23, 2016, 10:20:49 PM2/23/16
to Redmine Users (japanese)
初めまして。

https://groups.google.com/forum/#!searchin/redmine-users-ja/css/redmine-users-ja/5ZlowgE2_Kw/QV9wglICrB4J

にもあるようにレイアウトが私の環境でも表示されません。
動作はしているようなので、スタイルシートの問題だと思うのですが、そこからよくわかりません。

/var/log/httpd/error_logを見てみると

[Wed Feb 24 12:10:19 2016] [crit] [client 58.138.149.106] configuration error:  couldn't perform authentication. AuthType not set!: /stylesheets/jquery/jquery-ui-1.11.0.css, referer: xxxxxx
[Wed Feb 24 12:10:19 2016] [crit] [client 58.138.149.106] configuration error:  couldn't perform authentication. AuthType not set!: /themes/alternate/stylesheets/application.css, referer: xxxxxx
[Wed Feb 24 12:10:19 2016] [crit] [client 58.138.149.106] configuration error:  couldn't perform authentication. AuthType not set!: /stylesheets/responsive.css, referer: xxxxxx
[Wed Feb 24 12:10:19 2016] [crit] [client 58.138.149.106] configuration error:  couldn't perform authentication. AuthType not set!: /javascripts/jquery-1.11.1-ui-1.11.0-ujs-3.1.4.js, referer: xxxxxx
[Wed Feb 24 12:10:19 2016] [crit] [client 58.138.149.106] configuration error:  couldn't perform authentication. AuthType not set!: /javascripts/responsive.js, referer: xxxxxx
[Wed Feb 24 12:10:19 2016] [crit] [client 58.138.149.106] configuration error:  couldn't perform authentication. AuthType not set!: /javascripts/application.js, referer: xxxxxx
[Wed Feb 24 12:10:19 2016] [crit] [client 58.138.149.106] configuration error:  couldn't perform authentication. AuthType not set!: /javascripts/responsive.js, referer: xxxxxx

となっており、cssにアクセスすると
<title>500 Internal Server Error</title>
となります

作業手順は
http://blog.redmine.jp/articles/3_2/install/centos/
を参考に1から行いました。


環境は以下の通りです。

VPSのCentOS release 6.6 (Final)で
Server version: Apache/2.2.15 (Unix)
psql (PostgreSQL) 8.4.20

/etc/httpd/conf.d/redmine.confは以下の通りです

<Directory "/var/lib/redmine/public">
  Require all granted
</Directory>

# Passengerの基本設定。
# passenger-install-apache2-module --snippet で表示された設定を記述。
# 環境によって設定値が異なるため以下の3行はそのまま転記せず、必ず
# passenger-install-apache2-module --snippet で表示されたものを使用すること。
#
LoadModule passenger_module /usr/local/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/passenger-5.0.25/buildout/apache2/mod_passenger.so
<IfModule mod_passenger.c>
  PassengerRoot /usr/local/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/passenger-5.0.25
  PassengerDefaultRuby /usr/local/rbenv/versions/2.2.2/bin/ruby
</IfModule>

# Passengerが追加するHTTPヘッダを削除するための設定(任意)。
#
Header always unset "X-Powered-By"
Header always unset "X-Runtime"

# 必要に応じてPassengerのチューニングのための設定を追加(任意)。
# 詳しくはPhusion Passenger users guide(https://www.phusionpassenger.com/library/config/apache/reference/)参照。
PassengerMaxPoolSize 20
PassengerMaxInstancesPerApp 4
PassengerPoolIdleTime 864000
PassengerHighPerformance on
PassengerStatThrottleRate 10
PassengerSpawnMethod smart
PassengerFriendlyErrorPages off

.htaccessもないようですし、お手上げです。
アドバイスをお願いします

あきぴー

unread,
Mar 7, 2016, 5:00:11 AM3/7/16
to Redmine Users (japanese)
あきぴーと申します。
原因は、Apacheのhttpd.confの設定が、Apacheのバージョンで異なるからのようです。

【例1】 別のアプリでも、Apacheが2.4よりも古い場合は同じようなメッセージが出ます。
Python: apache経由だとDjangoのadmin画面のcssが効かない
(引用開始)
※本家サイトでは「Allow from all」が「Require all granted」になっていますがapache2.4より古いと下記のエラーになってしまいます。
configuration error: couldn’t perform authentication. AuthType not set!: /admin/
(引用終了)

また、Bitnami Redmineのドキュメントには、Apacheのバージョンで設定を切り替えるような
箇所が記載されています。
#下記のドキュメントは、Redmineユーザ一般の人が参考にできる優れものです。

Bitnami Redmine - Bitnami documentation

(引用開始)
<Directory "/opt/bitnami/apps/redmine/htdocs/public">
    PassengerEnabled on
    Options -MultiViews
    AllowOverride All
    <IfVersion < 2.3 >
    Order allow,deny
    Allow from all
    </IfVersion>
    <IfVersion >= 2.3>
    Require all granted
    </IfVersion>
    SetEnv RAILS_RELATIVE_URL_ROOT "/new_url"
    PassengerAppRoot "/opt/bitnami/apps/redmine/htdocs"
</Directory>
(引用終了)
Reply all
Reply to author
Forward
0 new messages