lib/rconf/configurators/passenger_configurator.rb in rconf-0.10.1 vs lib/rconf/configurators/passenger_configurator.rb in rconf-1.0.0

- old
+ new

@@ -145,12 +145,12 @@ # true:: Always return true def install_passenger report_check('Installing passenger+nginx') # Grrrrr passenger installer expect rake where it's not... HACK ruby_dir = File.dirname(`which ruby`.chomp) - if ruby_dir !~ /\.rvm/ - post_note 'Please enable rvm before passenger is installed by running ' + 'cd ..;cd -'.blue + if ruby_dir !~ /\.rbenv/ + post_note 'Please init rbenv before passenger is installed by running ' + 'cd ..;cd -'.blue report_failure else FileUtils.cp(`which rake`.chomp, ruby_dir) unless rake_exist = File.exist?(File.join(ruby_dir, 'rake')) FileUtils.mkdir_p(install_path) Dir.chdir(install_path) do @@ -255,25 +255,25 @@ # POST and AJAX requests need to proxied directly to the library app ##################################################################### set $is_library_direct ""; - # request is for a library related action + # request is for a library related action if ($request_uri ~ ^/library/) { set $is_library_direct L; } - + # request is a POST if ($request_method = POST) { - set $is_library_direct "${is_library_direct}P"; + set $is_library_direct "${is_library_direct}P"; } - + # request is an AJAX if ($http_x_requested_with = XMLHttpRequest) - { + { set $is_library_direct "${is_library_direct}A"; } # library Post and Ajax request should be directly proxied if ( $is_library_direct ~ (LP|LPA|LA) ) @@ -311,12 +311,12 @@ proxy_set_header X-Relative-Root library; proxy_set_header X-Embedded on; proxy_set_header X-Core-Site-Domain 'right-site.rightscale.local'; } - # library static assets get proxied directly to the library app - location ~ ^/library/(.*)\.(css|js)$ { + # library static assets get proxied directly to the library app + location ~ ^/library/(.*)\.(css|js|html)$ { proxy_pass http://library.rightscale.local:3001/$1.$2; } # Library images are sent straight to the library location /library_images/ { @@ -332,24 +332,24 @@ } ##################################################################### set $is_global_system_direct ""; - # request is for a library related action + # request is for a library related action if ($request_uri ~ ^/global/) { set $is_global_system_direct L; } - + # request is a POST if ($request_method = POST) { - set $is_global_system_direct "${is_global_system_direct}P"; + set $is_global_system_direct "${is_global_system_direct}P"; } - + # request is an AJAX if ($http_x_requested_with = XMLHttpRequest) - { + { set $is_global_system_direct "${is_global_system_direct}A"; } # library Post and Ajax request should be directly proxied if ( $is_global_system_direct ~ (LP|LPA|LA) )