- Debian 9 stretch
- Bitnami Redmine Stack 3.4.3-0
URLを domain/redmine
から domain/example
へ変更する場合は、下記のファイルを修正し Redmine を再起動します。
$ 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"
$ 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
内のアンカータグの href
属性の値を2か所、redmine
から example
へ修正します。
$ sudo vi /opt/redmine-3.4.3-0/apache2/htdocs/index.html
URLを domain/redmine
から domain
へ変更する場合は、下記のファイルを修正し Redmine を再起動します。
$ 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"
$ 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
必要に応じて 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