Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
rpm --import http://passenger.stealthymonkeys.com/RPM-GPG-KEY-stealthymonkeys.asc
yum install http://passenger.stealthymonkeys.com/rhel/6/passenger-release.noarch.rpm
yum install mod_passenger

 

설정

설정 파일은 /etc/httpd/conf.d/passenger.conf  에 위치하므로 에디터로 설정을 수정한후에 apache httpd 를 재구동하면 된다.

 

SELinux 문제 해결

passenger가 설치된 경로를 SELinux policy 때문에 아파치 httpd가 읽지 못 해서 제대로 구동되지 않을 수가 있다. /var/log/audit/audit.log 에 다음과 같은 내용이 있다면 SELinux에 맞게 type enforcement 를 설정해 줘야 한다.

Code Block
type=AVC msg=audit(1394037185.556:72502): avc:  denied  { chown } for  pid=24128 comm="PassengerWatchd" capability=0  scontext=unconfined_u:system_r:httpd_sys_script_t:s0 tcontext=unconfined_u:system_r:httpd_sys_script_t:s0 tclass=capability        Was caused by:
                Missing type enforcement (TE) allow rule.
                You can use audit2allow to generate a loadable module to allow this access.

 

  1. passenger 설치 루트 폴더를 알아낸다.

    Code Block
    > passenger-config --root             
    /usr/lib/ruby/gems/1.8/gems/passenger-3.0.21
  2. 설치 루트에 httpd 가 읽을 수 있게 label 을 설정한다.

    Code Block
    chcon -R -h -t httpd_sys_content_t /usr/lib/ruby/gems/1.8/gems/passenger-3.0.21
  3. httpd 재구동