apatch에 passenger2.2.9연동 부분이요

armyinsa의 이미지

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 /]#

armyinsa의 이미지


해결했습니다.

인터넷에 있는 글 읽으면서요...

삽질만 했네요~~!!..

아주 간단하네요.~~!!

아파치 기동시키면...

www.hyo.com

으로 홈페이지가 보이네요.~!

댓글 달기

Filtered HTML

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

BBCode

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param>
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

Textile

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • You can use Textile markup to format text.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Markdown

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • Quick Tips:
    • Two or more spaces at a line's end = Line break
    • Double returns = Paragraph
    • *Single asterisks* or _single underscores_ = Emphasis
    • **Double** or __double__ = Strong
    • This is [a link](http://the.link.example.com "The optional title text")
    For complete details on the Markdown syntax, see the Markdown documentation and Markdown Extra documentation for tables, footnotes, and more.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Plain text

  • HTML 태그를 사용할 수 없습니다.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 줄과 단락은 자동으로 분리됩니다.
댓글 첨부 파일
이 댓글에 이미지나 파일을 업로드 합니다.
파일 크기는 8 MB보다 작아야 합니다.
허용할 파일 형식: txt pdf doc xls gif jpg jpeg mp3 png rar zip.
CAPTCHA
이것은 자동으로 스팸을 올리는 것을 막기 위해서 제공됩니다.