Permalink
Browse files

update to fix passanger injection on apache config

  • Loading branch information...
1 parent b1f9643 commit eb95940177a3bcfda35cac42b04493885d2b892a @inforserver2 committed May 3, 2014
Showing with 9 additions and 7 deletions.
  1. +9 −7 passenger_config
View
@@ -8,14 +8,16 @@ then
echo LoadModule for passenger already in place
else
echo Compiling passenger
- passenger-install-apache2-module -a
+ sudo passenger-install-apache2-module -a
echo Pushing LoadModule to httpd.conf...
-cat >> /etc/apache2/httpd.conf <<-EOF
-LoadModule passenger_module /usr/lib/ruby/gems/$ruby_version/gems/passenger-$var/buildout/apache2/mod_passenger.so
-<IfModule mod_passenger.c>
-PassengerRoot /usr/lib/ruby/gems/$ruby_version/gems/passenger-$var
-PassengerDefaultRuby /usr/bin/ruby
-</IfModule>
+cat << EOF | sudo tee -a/etc/apache2/httpd.conf
+
+ LoadModule passenger_module /var/lib/gems/$ruby_version/gems/passenger-$var/buildout/apache2/mod_passenger.so
+ <IfModule mod_passenger.c>
+ PassengerRoot /var/lib/gems/$ruby_version/gems/passenger-$var
+ PassengerDefaultRuby /usr/bin/ruby
+ </IfModule>
+
EOF
echo done.
fi

0 comments on commit eb95940

Please sign in to comment.