質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.48%
Ruby on Rails

Ruby on Railsは、オープンソースのWebアプリケーションフレームワークです。「同じことを繰り返さない」というRailsの基本理念のもと、他のフレームワークより少ないコードで簡単に開発できるよう設計されています。

Redmine

Redmineは、プロジェクトのタスク管理、進捗管理、情報共有が可能な、 オープンソースプロジェクト管理ソフトウェアです。

Q&A

2回答

12933閲覧

Redmine3.4をインストールしたが403エラー。(CentOS7+httpd2.4)

hirarin

総合スコア6

Ruby on Rails

Ruby on Railsは、オープンソースのWebアプリケーションフレームワークです。「同じことを繰り返さない」というRailsの基本理念のもと、他のフレームワークより少ないコードで簡単に開発できるよう設計されています。

Redmine

Redmineは、プロジェクトのタスク管理、進捗管理、情報共有が可能な、 オープンソースプロジェクト管理ソフトウェアです。

0グッド

0クリップ

投稿2017/11/04 10:28

編集2017/11/05 14:49

###前提・実現したいこと
Redmine3.4をインストールしたが403エラー。(CentOS7+httpd2.4)

「Forbidden
You don't have permission to access /redmine on this server.」
が返されてしまいます。

ログをみて、いろいろ対処を行ってみましたが、もうお手上げです。
アドバイスをお願いできますでしょうか。

こちらのサイト
http://blog.redmine.jp/articles/3_4/install/centos/
を参考にして構築を行いました。

###発生している問題・エラーメッセージ

Redmineのページ http://example.com/redmine にアクセスすると 次のエラーが表示される。 [root@tredmine]# tail -f /var/log/httpd/error_log [Sat Nov 04 19:09:05.049475 2017] [core:error] [pid 27044] (13)Permission denied: [client ××.××.182:60288] AH00035: access to /redmine denied (filesystem path '/var/lib/redmine/public') because search permissions are missing on a component of the path

###該当のソースコード

[root@redmine]# cat /etc/httpd/conf.d/redmine.conf <Directory "/var/lib/redmine/public"> Require all granted </Directory> LoadModule passenger_module /usr/local/lib/ruby/gems/2.4.0/gems/passenger-5.1.11/buildout/apache2/mod_passenger.so <IfModule mod_passenger.c> PassengerRoot /usr/local/lib/ruby/gems/2.4.0/gems/passenger-5.1.11 PassengerDefaultRuby /usr/local/bin/ruby </IfModule> Header always unset "X-Powered-By" Header always unset "X-Runtime" guide(https://www.phusionpassenger.com/library/config/apache/reference/)参照。 PassengerMaxPoolSize 20 PassengerMaxInstancesPerApp 4 PassengerPoolIdleTime 864000 PassengerHighPerformance on PassengerStatThrottleRate 10 PassengerSpawnMethod smart PassengerFriendlyErrorPages off #PassengerLogFile /var/log/httpd/passenger_error.log RackBaseURI /redmine Alias /redmine /var/lib/redmine/public <Location /redmine> PassengerBaseURI /redmine PassengerAppRoot /var/lib/redmine </Location>

###試したこと
httpd restart を実行し、エラーログを確認しました。

[Sat Nov 04 19:18:18.341890 2017] [mpm_prefork:notice] [pid 27150] AH00170: caught SIGWINCH, shutting down gracefully
[Sat Nov 04 19:18:19.425401 2017] [suexec:notice] [pid 27173] AH01232: suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Sat Nov 04 19:18:19.432082 2017] [passenger:error] [pid 27173] *** Passenger could not be initialized because of this error: Unable to start the Phusion Passenger watchdog because its executable (/usr/local/lib/ruby/gems/2.4.0/gems/passenger-5.1.11/buildout/agents/PassengerWatchdog) does not exist. This probably means that your Phusion Passenger installation is broken or incomplete, or that your 'PassengerRoot' directive is set to the wrong value. Please reinstall Phusion Passenger or fix your 'PassengerRoot' directive, whichever is applicable. To learn how to fix 'PassengerRoot', please read https://www.phusionpassenger.com/documentation/Users%20guide%20Apache.html#PassengerRoot
[Sat Nov 04 19:18:19.453291 2017] [so:warn] [pid 27173] AH01574: module passenger_module is already loaded, skipping
[Sat Nov 04 19:18:19.454638 2017] [auth_digest:notice] [pid 27173] AH01757: generating secret for digest authentication ...
[Sat Nov 04 19:18:19.455916 2017] [lbmethod_heartbeat:notice] [pid 27173] AH02282: No slotmem from mod_heartmonitor
[Sat Nov 04 19:18:19.470107 2017] [passenger:error] [pid 27173] *** Passenger could not be initialized because of this error: Unable to start the Phusion Passenger watchdog because its executable (/usr/local/lib/ruby/gems/2.4.0/gems/passenger-5.1.11/buildout/agents/PassengerWatchdog) does not exist. This probably means that your Phusion Passenger installation is broken or incomplete, or that your 'PassengerRoot' directive is set to the wrong value. Please reinstall Phusion Passenger or fix your 'PassengerRoot' directive, whichever is applicable. To learn how to fix 'PassengerRoot', please read https://www.phusionpassenger.com/documentation/Users%20guide%20Apache.html#PassengerRoot
[Sat Nov 04 19:18:19.475702 2017] [mpm_prefork:notice] [pid 27173] AH00163: Apache/2.4.6 (CentOS) Phusion_Passenger/4.0.53 configured -- resuming normal operations
[Sat Nov 04 19:18:19.475785 2017] [core:notice] [pid 27173] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND'

###補足情報(言語/FW/ツール等のバージョンなど)

CentOS Linux release 7.4.1708 (Core)
httpd 2.4.6
Ruby 2.4.2

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

kentei_syunrai

2017/11/11 05:19

参考ページの手順どうりに構築していると考えればよいですか? SELinuxは無効化していますか?
hirarin

2017/12/07 10:50

はい、参考ページの手順どおりに構築しています。SELinuxは無効化しています。
guest

回答2

0

SELinuxは無効になっていますでしょうか?

http://blog.redmine.jp/articles/3_4/install/centos/ 内の「SELinuxを無効にする」に書かれている設定を再度確認いただけますか?

投稿2017/12/10 11:40

g_maeda

総合スコア55

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

hirarin

2017/12/11 04:31

はい、無効化しています。
guest

0

以下を確認してください。

■redmine.confの記載が正しいかどうか

LoadModule passenger_module /usr/local/lib/ruby/gems/2.4.0/gems/passenger-5.1.11/buildout/apache2/mod_passenger.so <IfModule mod_passenger.c> PassengerRoot /usr/local/lib/ruby/gems/2.4.0/gems/passenger-5.1.11 PassengerDefaultRuby /usr/local/bin/ruby </IfModule>

上記の/etc/httpd/conf.d/redmine.conf の記載ですが、
passengerのバージョンは正しいですか?

1つ前の項で「passenger-install-apache2-module --snippet」を実行していると思いますが、
そこで出力されるものを記載する必要があります。

■「bundle install --without development test --path vendor/bundle」に失敗していないか

本コマンドをたたいた際に、言われた通りにやっているとmysqlがなくて失敗するようです。
コマンドをたたく前に以下を実行する必要があります。(1つめは念のためです。念のためデフォルトのmariadbを消しています。)

yum remove mariadb-libs yum install mysql-devel

投稿2017/12/09 02:31

kentei_syunrai

総合スコア946

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

hirarin

2017/12/11 04:34

ありがとうございます。bundle install で失敗していました。 記載いただいた内容で試したところ、インストールに成功しました。 しかし、403エラーは回避できず。 Apacheのエラーログには、次のようなエラーが記録されていました。 [Mon Dec 11 13:28:36.830302 2017] [passenger:error] [pid 30108] *** Passenger could not be initialized because of this error: Unable to start the Phusion Passenger watchdog because its executable (/usr/local/lib/ruby/gems/2.4.0/gems/passenger-5.1.12/buildout/agents/PassengerWatchdog) does not exist. This probably means that your Phusion Passenger installation is broken or incomplete, or that your 'PassengerRoot' directive is set to the wrong value. Please reinstall Phusion Passenger or fix your 'PassengerRoot' directive, whichever is applicable. To learn how to fix 'PassengerRoot', please read https://www.phusionpassenger.com/documentation/Users%20guide%20Apache.html#PassengerRoot [Mon Dec 11 13:28:36.849648 2017] [so:warn] [pid 30108] AH01574: module passenger_module is already loaded, skipping [Mon Dec 11 13:28:36.849740 2017] [so:warn] [pid 30108] AH01574: module passenger_module is already loaded, skipping [Mon Dec 11 13:28:36.851003 2017] [auth_digest:notice] [pid 30108] AH01757: generating secret for digest authentication ... [Mon Dec 11 13:28:36.852216 2017] [lbmethod_heartbeat:notice] [pid 30108] AH02282: No slotmem from mod_heartmonitor [Mon Dec 11 13:28:36.865404 2017] [passenger:error] [pid 30108] *** Passenger could not be initialized because of this error: Unable to start the Phusion Passenger watchdog because its executable (/usr/local/lib/ruby/gems/2.4.0/gems/passenger-5.1.12/buildout/agents/PassengerWatchdog) does not exist. This probably means that your Phusion Passenger installation is broken or incomplete, or that your 'PassengerRoot' directive is set to the wrong value. Please reinstall Phusion Passenger or fix your 'PassengerRoot' directive, whichever is applicable. To learn how to fix 'PassengerRoot', please read https://www.phusionpassenger.com/documentation/Users%20guide%20Apache.html#PassengerRoot [Mon Dec 11 13:28:36.869296 2017] [mpm_prefork:notice] [pid 30108] AH00163: Apache/2.4.6 (CentOS) Phusion_Passenger/4.0.53 configured -- resuming normal operations [Mon Dec 11 13:28:36.869324 2017] [core:notice] [pid 30108] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND' [Mon Dec 11 13:28:51.196764 2017] [autoindex:error] [pid 30113] [client 210.136.166.160:6633] AH01276: Cannot serve directory /var/lib/redmine/public/: No matching DirectoryIndex (index.html) found, and server-generated directory index forbidden by Options directive ^C
kentei_syunrai

2017/12/11 14:24

/etc/httpd/conf.d/redmine.conf はちゃんと直していますか? まずは参考サイトと同じになるようにしてください。(RackBaseURI /redmineなどはないはずです)
guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

まだベストアンサーが選ばれていません

会員登録して回答してみよう

アカウントをお持ちの方は

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.48%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問