2
2

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 5 years have passed since last update.

AlminiumでBasic認証を追加

Posted at
認証設定
htpasswd -c /opt/alminium.htpasswd yamada
  • /opt/alminium.htpasswd に yamada ユーザと、暗号化されたパスワードが格納される。
/etc/httpd/conf.d/redmine.conf
  <VirtualHost *:80>
  ServerName localhost
  DocumentRoot /opt/alminium/public
  
  ExpiresActive On
  ExpiresByType application/x-javascript A259200
  ExpiresByType application/javascript A259200
  ExpiresByType image/png A2592000
  ExpiresByType image/jpeg A2592000
  ExpiresByType image/gif A2592000
  ExpiresByType text/css A2592000
  
  #RewriteEngine On
  #RewriteCond %{SERVER_PORT} 80
  #RewriteCond %{SERVER_NAME} !localhost
  #RewriteRule ^(.*)?$ https://%{HTTP_HOST}$1 [R,L]
  
+ # Basic Auth
+ <Directory /opt/alminium/public/>
+   AuthUserFile /opt/alminium.htpasswd
+   AuthGroupFile /dev/null
+   AuthName "Please enter ID and password"
+   AuthType Basic
+   require valid-user
+   order deny,allow
+ </Directory>
  
  </VirtualHost>
設定適用
/etc/init.d/httpd restart
2
2
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
2
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?