0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

RedmineにBasic認証を追加する。

Posted at

#概要
RedmineにBasic認証を追加する方法を記載する。
早い話がログイン時に下記認証を走らせるようにする
Basic認証.png

#作業実施

rootユーザにスイッチ
bitnami@ip-172-26-15-172:/var/lib$ sudo su -
root@ip-172-26-15-172:~# 
Basic認証用アカウント作成
root@ip-172-26-15-172:~# htpasswd -c /opt/bitnami/apache2/.htpasswd ユーザ名
New password: 
Re-type new password: 
Adding password for user ユーザ名
/opt/bitnami/apps/redmine/conf/httpd-app.confの設定変更
RewriteEngine On
RewriteRule /<none> / [L,R]

<Directory "/opt/bitnami/apps/redmine/htdocs/public">
    Options -MultiViews
    AllowOverride All
    AuthType Basic
    AuthName MyAuthName
    AuthUserFile "/opt/bitnami/apache2/.htpasswd"
    Require valid-user

<IfVersion < 2.3 >
Order allow,deny
Allow from all
    </IfVersion>
    <IfVersion >= 2.3>
#Require all granted
    </IfVersion>

PassengerEnabled on
    #SetEnv RAILS_RELATIVE_URL_ROOT "/redmine"
    PassengerAppRoot "/opt/bitnami/apps/redmine/htdocs/"
    <IfModule pagespeed_module>
ModPagespeedDisallow "*"
    </IfModule>


Include "/opt/bitnami/apps/redmine/conf/banner.conf"
</Directory>
apacheの再起動
root@ip-172-26-15-172:~# apachectl configtest
Syntax OK
root@ip-172-26-15-172:~# /opt/bitnami/ctlscript.sh restart apache
Unmonitored apache
Syntax OK
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?