Install apache2 and passenger to CentOS with non root account

2009/03/02 17:06 に 森山誠二郎 が投稿   [ 2009/03/06 18:36 に更新しました ]
  1. Download Apache2 from http://httpd.apache.org/
  2. At source directory
    ./configure --prefix=/home/moriyama/tools/apache2 --enable-dav --enable-so --enable-rewrite=shared --enable-ssl=shared --with-mpm=worker
  3. make & make install
  4. Because localhost:80 does not work due to permission denial, changed port to 8080 in httpd.conf
  5. gem install passenger
  6. execute passenger installation command below (rehash if you are using csh)
    passenger-install-apache2-module
    Caution: do not forget to add /home/moriyama/tools/apache2 in your PATH
                   rehash if you are using csh before invoking the installation command
  7. Add three settings below which are shown by the installer
    LoadModule passenger_module /home/moriyama/tools/lib/ruby/gems/1.8/gems/passenger-2.0.6/ext/apache2/mod_passenger.so
    PassengerRoot /home/moriyama/tools/lib/ruby/gems/1.8/gems/passenger-2.0.6
    PassengerRuby /home/moriyama/tools/bin/ruby
  8. Add the virtual host setting below in httpd.conf
    <VirtualHost *:3080>
        ServerName anagix
        DocumentRoot /home/moriyama/your_rails_app/public
    </VirtualHost>
  9. Comment out 'Deny from all' in httpd.conf
  10. apachectl start
  11. apachectl stop
Comments