...
설정 파일은 /etc/httpd/conf.d/passenger.conf 에 위치하므로 에디터로 설정을 수정한후에 apache httpd 를 재구동하면 된다.
SELinux 문제 해결
RHEL/CentOS 6.3 까지는 관련 SELinux policy 가 없으므로 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. |
6.4부터는 policy 가 추가되어서 특별히 설정하지 않아도 잘 동작한다. (https://bugzilla.redhat.com/show_bug.cgi?id=864546)
passenger 설치 루트 폴더를 알아낸다.
Code Block > passenger-config --root /usr/lib/ruby/gems/1.8/gems/passenger-3.0.21
설치 루트에 httpd 가 읽을 수 있게 label 을 설정한다.
Code Block chcon -R -h -t httpd_sys_content_t /usr/lib/ruby/gems/1.8/gems/passenger-3.0.21
- httpd 재구동
...