Install apache2 and passenger to CentOS with non root account

Post date: 2009/03/03 1:06:35

  1. Download Apache2 from http://httpd.apache.org/
  2. At source directory
    1. ./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)
    1. passenger-install-apache2-module
    2. Caution: do not forget to add /home/moriyama/tools/apache2 in your PATH
    3. rehash if you are using csh before invoking the installation command
  7. Add three settings below which are shown by the installer
    1. LoadModule passenger_module /home/moriyama/tools/lib/ruby/gems/1.8/gems/passenger-2.0.6/ext/apache2/mod_passenger.so
    2. PassengerRoot /home/moriyama/tools/lib/ruby/gems/1.8/gems/passenger-2.0.6
    3. PassengerRuby /home/moriyama/tools/bin/ruby
  8. Add the virtual host setting below in httpd.conf
    1. <VirtualHost *:3080>
    2. ServerName anagix
    3. DocumentRoot /home/moriyama/your_rails_app/public
    4. </VirtualHost>
  9. Comment out 'Deny from all' in httpd.conf
  10. apachectl start
  11. apachectl stop