webrick 는 개발용 웹서버라 production 환경에서는 적합하지 않다. apache 나 NginX 같은 Web Server에서 rails app 구동할 예정이면 fcgi 보다는 Phusion Passenger 같은 전문 rails deployer를 설치해야 한다.
설정 파일은 /etc/httpd/conf.d/passenger.conf 에 위치하므로 에디터로 설정을 수정한후에 apache httpd 를 재구동하면 된다.
SELinux 문제 해결
RHEL/CentOS 6.3 까지는 관련 SELinux policy 가 없으므로 passenger가 설치된 경로를 아파치 httpd가 읽지 못해서서 제대로 구동되지 않는다.
/var/log/audit/audit.log 에 다음과 같은 내용이 있다면 SELinux에 맞게 type enforcement 를 설정해 줘야 한다.
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.