apatch에 passenger2.2.9연동 부분이요
OS : centos
아파치에 passenger2.2.9 연동하려고 하는데요..잘안되네요
passenger인스톨까지는 완료되었구요.
아래에 보시면 예를 들어 이렇게 설정하라 라고
나와있습니다.
첫번째는 httpd.conf파일에 이것을 추가해줬구요.
LoadModule passenger_module /usr/local/lib/ruby/gems/1.8/gems/passenger-2.2.9/ext/apache2/mod_passenger.so
PassengerRoot /usr/local/lib/ruby/gems/1.8/gems/passenger-2.2.9
PassengerRuby /usr/local/bin/ruby
두번째 부분입니다. 이부분이 조금 헷깔립니다.
예를 들어 이렇게 하라라고 적혀있는데요...
ServerName www.yourhost.com
DocumentRoot /somewhere/public # <-- be sure to point to 'public'!
AllowOverride all # <-- relax Apache security settings
Options -MultiViews # <-- MultiViews must be turned off
이부분를 httpd.conf에 적용시켰습니다.
실제로 제 서버의 셋팅부분을 적어보겠습니다.
/home/trunk/hyo.com <-- hyo.com이란 레일즈로만든 어플리케이션입니다.
ServerName www.hyo.com
DocumentRoot /home/trunk/hyo.com/public
AllowOverride all
Options -MultiViews
이렇게 적용후
아파치 httpd restart 후
웹브라우져에서
http://www.hyo.com
엔터치면 안되네요..~~!!
뭐가 문제인지요?
인터세 찾아보면
VirtualHost의 Root로 설정하기와Sub 디렉토리로 설정하기 부분이 나와있는데
조금이해가 안갔습니다.
URL : http://inocrazy.com/docs/8
저같은 경우는
/home/trunk/hyo.com <-- hyo.com이란 레일즈로만든 어플리케이션입니다.
VirtualHost의 Root로 설정하기로 했는데요.
http://inocrazy.com/docs/8 를 보면
ServerName inocrazy.com DocumentRoot /home/inocrazy/www/current/public
이런씩으로 나와있습니다. 왜 current를 심볼릭링크를 해야하나요...~~!
저는
ServerName www.hyo.com
DocumentRoot /home/trunk/hyo.com/public <--hyo.com이 있는 장소 설정
<--hyo.com이 있는 장소 설정
AllowOverride all
Options -MultiViews
이렇게 설정했습니다.
뭔가 문제인가요? ...
log를 보니까요?
192.168.101.136 - - [18/Jan/2010:10:22:47 +0900] "GET /top HTTP/1.1" 500 947
192.168.101.136 - - [18/Jan/2010:10:22:49 +0900] "GET /top HTTP/1.1" 500 947
192.168.101.136 - - [18/Jan/2010:10:22:54 +0900] "GET /top HTTP/1.1" 500 947
192.168.101.136 - - [18/Jan/2010:10:22:56 +0900] "GET /top HTTP/1.1" 500 947
192.168.101.136 - - [18/Jan/2010:11:08:47 +0900] "GET /top HTTP/1.1" 500 947
192.168.101.136 - - [18/Jan/2010:11:08:51 +0900] "GET / HTTP/1.1" 500 947
192.168.101.136 - - [18/Jan/2010:11:08:52 +0900] "GET / HTTP/1.1" 500 947
192.168.101.136 - - [18/Jan/2010:12:19:08 +0900] "GET / HTTP/1.1" 500 947
500방 에러가 나오네요...
뭐가 문제인지요?
___________________________________________________________
아래는 passergen 2.2.9인스톨 완료부분입니다.
The Apache 2 module was successfully installed.
Please edit your Apache configuration file, and add these lines:
LoadModule passenger_module /usr/local/lib/ruby/gems/1.8/gems/passenger-2.2.9/ext/apache2/mod_passenger.so
PassengerRoot /usr/local/lib/ruby/gems/1.8/gems/passenger-2.2.9
PassengerRuby /usr/local/bin/ruby
After you restart Apache, you are ready to deploy any number of Ruby on Rails
applications on Apache, without any further Ruby on Rails-specific
configuration!
Press ENTER to continue.
^[[D
--------------------------------------------
Deploying a Ruby on Rails application: an example
Suppose you have a Rails application in /somewhere. Add a virtual host to your
Apache configuration file and set its DocumentRoot to /somewhere/public:
ServerName www.yourhost.com
DocumentRoot /somewhere/public # <-- be sure to point to 'public'!
AllowOverride all # <-- relax Apache security settings
Options -MultiViews # <-- MultiViews must be turned off
And that's it! You may also want to check the Users Guide for security and
optimization tips, troubleshooting and other useful information:
/usr/local/lib/ruby/gems/1.8/gems/passenger-2.2.9/doc/Users guide Apache.html
Enjoy Phusion Passenger, a product of Phusion (www.phusion.nl) :-)
http://www.modrails.com/
Phusion Passenger is a trademark of Hongli Lai & Ninh Bui.
[root@localhost /]#
글쓴이
해결했습니다.
인터넷에 있는 글 읽으면서요...
삽질만 했네요~~!!..
아주 간단하네요.~~!!
아파치 기동시키면...
www.hyo.com
으로 홈페이지가 보이네요.~!
댓글 달기