Skip to content

Instantly share code, notes, and snippets.

@minazou67
Created November 14, 2017 06:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save minazou67/be9252cc4c46a6463fab4456f7726016 to your computer and use it in GitHub Desktop.
Save minazou67/be9252cc4c46a6463fab4456f7726016 to your computer and use it in GitHub Desktop.
How to change URL of Bitnami Redmine Stack

How to change URL of Bitnami Redmine Stack

Environment

  • Debian 9 stretch
  • Bitnami Redmine Stack 3.4.3-0

How to change the application name

URLを domain/redmine から domain/example へ変更する場合は、下記のファイルを修正し Redmine を再起動します。

httpd-prefix.conf

$ sudo vi /opt/redmine-3.4.3-0/apps/redmine/conf/httpd-prefix.conf
1 Alias /example/ "/opt/redmine-3.4.3-0/apps/redmine/htdocs/public/"
2 Alias /example "/opt/redmine-3.4.3-0/apps/redmine/htdocs/public"
3
4 Include "/opt/redmine-3.4.3-0/apps/redmine/conf/httpd-app.conf"

httpd-app.conf

$ sudo vi /opt/redmine-3.4.3-0/apps/redmine/conf/httpd-app.conf
 1
 2 <Directory "/opt/redmine-3.4.3-0/apps/redmine/htdocs/public">
 3     Options -MultiViews
 4     AllowOverride All
 5     <IfVersion < 2.3 >
 6         Order allow,deny
 7         Allow from all
 8     </IfVersion>
 9     <IfVersion >= 2.3>
10         Require all granted
11     </IfVersion>
12
13     PassengerEnabled on
14     SetEnv RAILS_RELATIVE_URL_ROOT "/example"
15     PassengerAppRoot "/opt/redmine-3.4.3-0/apps/redmine/htdocs/"
16     <IfModule pagespeed_module>
17         ModPagespeedDisallow "*"
18     </IfModule>
19
20
21 </Directory>
22 PassengerPreStart http://127.0.0.1:80/example

index.html

index.html 内のアンカータグの href 属性の値を2か所、redmine から example へ修正します。

$ sudo vi /opt/redmine-3.4.3-0/apache2/htdocs/index.html

No application name

URLを domain/redmine から domain へ変更する場合は、下記のファイルを修正し Redmine を再起動します。

httpd-prefix.conf

$ sudo vi /opt/redmine-3.4.3-0/apps/redmine/conf/httpd-prefix.conf
1 # Alias /redmine/ "/opt/redmine-3.4.3-0/apps/redmine/htdocs/public/"
2 # Alias /redmine "/opt/redmine-3.4.3-0/apps/redmine/htdocs/public"
3
4 DocumentRoot "/opt/redmine-3.4.3-0/apps/redmine/htdocs/public/"
5 Include "/opt/redmine-3.4.3-0/apps/redmine/conf/httpd-app.conf"

httpd-app.conf

$ sudo vi /opt/redmine-3.4.3-0/apps/redmine/conf/httpd-app.conf
 1
 2 <Directory "/opt/redmine-3.4.3-0/apps/redmine/htdocs/public">
 3     Options -MultiViews
 4     AllowOverride All
 5     <IfVersion < 2.3 >
 6         Order allow,deny
 7         Allow from all
 8     </IfVersion>
 9     <IfVersion >= 2.3>
10         Require all granted
11     </IfVersion>
12
13     PassengerEnabled on
14 #    SetEnv RAILS_RELATIVE_URL_ROOT "/redmine"
15 #    PassengerAppRoot "/opt/redmine-3.4.3-0/apps/redmine/htdocs/"
16     <IfModule pagespeed_module>
17         ModPagespeedDisallow "*"
18     </IfModule>
19
20
21 </Directory>
22 PassengerPreStart http://127.0.0.1:80/redmine

favicon.ico

必要に応じて Bitnami のファビコンを Redmine のファビコンへ変更します。

$ sudo cp -i /opt/redmine-3.4.3-0/apps/redmine/htdocs/public/favicon.ico /opt/redmine-3.4.3-0/apache2/htdocs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment