passenger-install-apache2-module was successed. but not boot.
When it starts, it becomes 500 Internal Server Error.
Isn't this failing in the preparation of "libboost_thread.a" during
the installation?
------environment---------
MacOSX(Leopard)
Apache2(MacPort)
$ env | grep "^PATH"
PATH=/opt/local/apache2/bin:/opt/local/bin:/opt/local/sbin:/usr/bin:/
bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin
$ gem list
...
rails (2.0.2, 1.2.6, 1.2.3)
rake (0.8.1, 0.7.3)
...
$ ruby -v
ruby 1.8.6 (2007-09-24 patchlevel 111) [universal-darwin9.0]
$ httpd -v
Server version: Apache/2.2.8 (Unix)
Server built: Apr 20 2008 03:30:34
$ apxs -q CFLAGS
-O2
$ apxs -q INCLUDEDIR
/opt/local/apache2/include
$ ls -p /opt/local/apache2/include
ap_compat.h http_connection.h
mod_dbd.h util_cfgtree.h
ap_config.h http_core.h
mod_include.h util_charset.h
ap_config_auto.h http_log.h
mod_log_config.h util_ebcdic.h
ap_config_layout.h http_main.h
mod_proxy.h util_filter.h
ap_listen.h http_protocol.h
mod_ssl.h util_ldap.h
ap_mmn.h http_request.h
mod_status.h util_md5.h
ap_mpm.h http_vhost.h
mpm.h util_script.h
ap_provider.h httpd.h
mpm_common.h util_time.h
ap_regex.h mod_auth.h
mpm_default.h util_xml.h
ap_regkey.h mod_cgi.h os.h
ap_release.h mod_core.h scoreboard.h
http_config.h mod_dav.h unixd.h
$
-------install log---------
$ sudo passenger-install-apache2-module
Password:
Welcome to the Passenger Apache 2 module installer.
This installer will guide you through the entire installation process.
It
shouldn't take more than 3 minutes in total.
Here's what you can expect from the installation process:
1. The Apache 2 module will be installed for you.
2. You'll learn how to configure Apache.
3. You'll learn how to deploy a Ruby on Rails application.
Don't worry if anything goes wrong. This installer will advise you on
how to
solve any problems.
Press Enter to continue, or Ctrl-C to abort.
Checking for required software...
* GNU C++ compiler... found at /usr/bin/g++
* Ruby development headers... found
* OpenSSL support for Ruby... found
* RubyGems... found
* Rake... found at /usr/bin/rake
* Apache 2... found at /opt/local/apache2/bin/httpd
* Apache 2 development headers... found at /opt/local/apache2/bin/
apxs
* Apache Portable Runtime (APR) development headers... found at /opt/
local/bin/apr-1-config
* fastthread... found
--------------------------------------------
--------------------------------------------
Compiling and installing Apache 2 module...
cd /Library/Ruby/Gems/1.8/gems/passenger-1.0.4
rake clean apache2
(in /Library/Ruby/Gems/1.8/gems/passenger-1.0.4)
### In ext/apache2:
rm -rf Utils.o Logging.o Configuration.o Hooks.o mod_passenger.o
mod_passenger.so
### In ext/passenger:
make clean
rm -f Makefile
### In ext/boost/src:
rm -f libboost_thread.a *.o
### In test:
rm -f Apache2ModuleTests *.o
### In benchmark:
rm -f DummyRequestHandler
### In ext/boost/src:
g++ -O2 -fPIC -I../.. -D_REENTRANT -DNDEBUG -c *.cpp
ar cru libboost_thread.a *.o
ranlib: file: libboost_thread.a(tss_dll.o) has no symbols
ranlib: file: libboost_thread.a(tss_hooks.o) has no symbols
ranlib: file: libboost_thread.a(tss_null.o) has no symbols
ranlib: file: libboost_thread.a(tss_pe.o) has no symbols
ranlib libboost_thread.a
ranlib: file: libboost_thread.a(tss_dll.o) has no symbols
ranlib: file: libboost_thread.a(tss_hooks.o) has no symbols
ranlib: file: libboost_thread.a(tss_null.o) has no symbols
ranlib: file: libboost_thread.a(tss_pe.o) has no symbols
### In ext/apache2:
g++ -I.. -fPIC -g -DPASSENGER_DEBUG -DDARWIN -
DSIGPROCMASK_SETS_THREAD_MASK -no-cpp-precomp -I/opt/local/include/
apr-1 -I/opt/local/apache2/include -D_REENTRANT -Wall -g -I/usr/local/
include -c mod_passenger.c
### In ext/apache2:
g++ -I.. -fPIC -g -DPASSENGER_DEBUG -DDARWIN -
DSIGPROCMASK_SETS_THREAD_MASK -no-cpp-precomp -I/opt/local/include/
apr-1 -I/opt/local/apache2/include -D_REENTRANT -Wall -g -I/usr/local/
include -c Utils.cpp
### In ext/apache2:
g++ -I.. -fPIC -g -DPASSENGER_DEBUG -DDARWIN -
DSIGPROCMASK_SETS_THREAD_MASK -no-cpp-precomp -I/opt/local/include/
apr-1 -I/opt/local/apache2/include -D_REENTRANT -Wall -g -I/usr/local/
include -c Logging.cpp
### In ext/apache2:
g++ -I.. -fPIC -g -DPASSENGER_DEBUG -DDARWIN -
DSIGPROCMASK_SETS_THREAD_MASK -no-cpp-precomp -I/opt/local/include/
apr-1 -I/opt/local/apache2/include -D_REENTRANT -Wall -g -I/usr/local/
include -c Configuration.cpp
### In ext/apache2:
g++ -I.. -fPIC -g -DPASSENGER_DEBUG -DDARWIN -
DSIGPROCMASK_SETS_THREAD_MASK -no-cpp-precomp -I/opt/local/include/
apr-1 -I/opt/local/apache2/include -D_REENTRANT -Wall -g -I/usr/local/
include -c Hooks.cpp
### In ext/apache2:
g++ -flat_namespace -bundle -undefined dynamic_lookup Utils.o
Logging.o Configuration.o Hooks.o mod_passenger.o -fPIC -o
mod_passenger.so -lstdc++ -lpthread ../boost/src/libboost_thread.a -
L/opt/local/lib -lapr-1
### In ext/passenger:
ruby extconf.rb
creating Makefile
### In ext/passenger:
make
gcc -I. -I/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/
lib/ruby/1.8/universal-darwin9.0 -I/System/Library/Frameworks/
Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin9.0 -I. -
fno-common -arch ppc -arch i386 -Os -pipe -fno-common -c
native_support.c
cc -arch ppc -arch i386 -pipe -bundle -undefined dynamic_lookup -o
native_support.bundle native_support.o -L"." -L"/System/Library/
Frameworks/Ruby.framework/Versions/1.8/usr/lib" -L. -arch ppc -arch
i386 -lruby -lpthread -ldl -lm
--------------------------------------------
The Apache 2 module was successfully installed.
Please edit your Apache configuration file, and add these lines:
LoadModule passenger_module /Library/Ruby/Gems/1.8/gems/
passenger-1.0.4/ext/apache2/mod_passenger.so
RailsSpawnServer /Library/Ruby/Gems/1.8/gems/passenger-1.0.4/bin/
passenger-spawn-server
RailsRuby /System/Library/Frameworks/Ruby.framework/Versions/1.8/
usr/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.
--------------------------------------------
Deploying a Ruby on Rails application: an example
Suppose you have a Ruby on Rails application in /somewhere. Add a
virtual host
to your Apache configuration file, and set its DocumentRoot to
/somewhere/public, like this:
<VirtualHost *:80>
ServerName
www.yourhost.com
DocumentRoot /somewhere/public
</VirtualHost>
And that's it! You may also want to check the Users Guide for security
and
optimization tips and other useful information:
/Library/Ruby/Gems/1.8/gems/passenger-1.0.4/doc/Users guide.html
Enjoy Passenger, a product of Phusion (
www.phusion.nl) :-)
http://www.modrails.com/
$