カテゴリー : Passenger

[Ruby] Passenger をアンインストールする

gem でインストールした Passenger をアンインストールする。

# gem uninstall passenger
Remove executables:
	passenger, passenger-install-apache2-module, passenger-install-nginx-module, passenger-config, passenger-status, passenger-memory-stats
 
in addition to the gem? [Yn]  Y
Removing passenger
Removing passenger-install-apache2-module
Removing passenger-install-nginx-module
Removing passenger-config
Removing passenger-status
Removing passenger-memory-stats
Successfully uninstalled passenger-3.0.19

・[参考]:Phusion Passenger ユーザーズガイド – インストール、アップグレード、アンインストール – LazyLoadLife

[Apache] Passenger の Basic 認証設定

Apache + Passenger で Basic 認証を設定したのでメモ。

myuser というユーザのパスワードファイルを作成する。

# htpasswd -c /usr/local/apache2/.htpasswd myuser

Apache の設定ファイルを修正する。

# vim /usr/local/apache2/conf/extra/passenger.conf
<VirtualHost *:80>
    PassengerUserSwitching off
    PassengerDefaultUser app
 
    ServerName example.com
    DocumentRoot "/srv/example.com/current/public"
    ErrorLog "logs/example.com-error_log"
    CustomLog "logs/example.com-access_log" common
    <Directory /srv/example.com/current/public>
        AllowOverride all
        Options -MultiViews
        Order allow,deny
        Allow from all
    </Directory>
    <Location />
        AuthType Basic
        AuthName "Please enter your ID and Password"
        AuthUserFile /usr/local/apache2/.htpasswd
        Require user myuser
    </Location>
 
</VirtualHost>

Apache の再起動

# service httpd restart

以上です。

【参考】

@IT:Apacheでユーザー認証を行うには(Basic認証編) はてなブックマーク - @IT:Apacheでユーザー認証を行うには(Basic認証編)

blog.sowatchasayin: rails + passengerでbasic認証 はてなブックマーク - blog.sowatchasayin: rails + passengerでbasic認証