プロジェクト

全般

プロフィール

Vote #80459

未完了

Redmine::Utils::relative_url_root in in environment.rb does not redirect links

Admin Redmine さんが約4年前に追加. 約4年前に更新.

ステータス:
New
優先度:
通常
担当者:
-
カテゴリ:
Issues_2
対象バージョン:
-
開始日:
2022/05/09
期日:
進捗率:

0%

予定工数:
category_id:
2
version_id:
0
issue_org_id:
32412
author_id:
428490
assigned_to_id:
0
comments:
0
status_id:
1
tracker_id:
1
plus1:
0
affected_version:
closed_on:
affected_version_id:
154
ステータス-->[New]

説明

As topic. When redmine is run with an relative url through apache, the relative_url_root does not redirect the links (Home, projects my_page etc.) Css and .js are redirected ok for some reason.

So, http://our_great.server:3000 works ok, but with http://our_great.server/redmine-qa, the links are broken.

Environment:

Environment:
  Redmine version                3.4.12.stable
  Ruby version                   2.4.6-p354 (2019-04-01) [x86_64-linux]
  Rails version                  4.2.11.1
  Environment                    production
  Database adapter               Mysql2
SCM:
  Subversion                     1.9.7
  Git                            2.17.1
  Filesystem                     
Redmine plugins:
  redmine_tags                   3.2.2
  scrum                          0.18.0

Apache configuration:

PassengerRuby /usr/share/rvm/wrappers/ruby-2.4.6/ruby


    ServerName our_great.server
    DocumentRoot /var/redmine_staging/public
    PassengerStickySessions on

    
        Allow from all
        Options -MultiViews
        Require all granted
                                                                                                                                                                                  

Proxy:

ProxyPass         /redmine-qa  http://localhost:3300 nocanon
ProxyPassReverse  /redmine-qa  http://localhost:3300
ProxyRequests     Off
AllowEncodedSlashes NoDecode
                                                                                                                                                                                              
        Options +Indexes +ExecCGI +FollowSymLinks -MultiViews
        Order Allow,Deny
        Allow from all

environment.rb

# Load the Rails application
require File.expand_path('../application', __FILE__)
                                                                                                                                                                                              # Make sure there's no plugin in vendor/plugin before starting
vendor_plugins_dir = File.join(Rails.root, "vendor", "plugins")
if Dir.glob(File.join(vendor_plugins_dir, "*")).any?
  $stderr.puts "Plugins in vendor/plugins (#{vendor_plugins_dir}) are no longer allowed. " +
    "Please, put your Redmine plugins in the `plugins` directory at the root of your " +
    "Redmine directory (#{File.join(Rails.root, "plugins")})"
  exit 1
end

# Initialize the Rails application
Rails.application.initialize!

Redmine::Utils::relative_url_root = "/redmine-qa"

In addition, this wiki will need updating probably:
https://www.redmine.org/projects/redmine/wiki/HowTo_Install_Redmine_on_subdirectory_(sub-URI)_on_Apache

Admin Redmine さんが約4年前に更新

  • カテゴリIssues_2 にセット

他の形式にエクスポート: Atom PDF

いいね!0
いいね!0