passenger 4.0.30 → 4.0.31
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of passenger might be problematic. Click here for more details.
- data.tar.gz.asc +7 -7
- data/NEWS +31 -0
- data/bin/passenger +5 -5
- data/bin/passenger-config +6 -126
- data/bin/passenger-install-apache2-module +108 -26
- data/bin/passenger-install-nginx-module +81 -27
- data/bin/passenger-memory-stats +7 -6
- data/bin/passenger-status +13 -10
- data/build/agents.rb +8 -12
- data/build/apache2.rb +12 -7
- data/build/basics.rb +28 -20
- data/build/common_library.rb +4 -4
- data/build/cplusplus_support.rb +4 -4
- data/build/cxx_tests.rb +5 -3
- data/build/debian.rb +1 -2
- data/build/integration_tests.rb +25 -9
- data/build/misc.rb +2 -2
- data/build/oxt_tests.rb +5 -6
- data/build/packaging.rb +72 -40
- data/build/ruby_tests.rb +5 -1
- data/build/test_basics.rb +1 -2
- data/debian.template/locations.ini.template +1 -0
- data/debian.template/rules.template +2 -1
- data/dev/install_scripts_bootstrap_code.rb +42 -0
- data/dev/run_travis.sh +1 -0
- data/dev/runner +27 -0
- data/doc/Packaging.txt.md +5 -10
- data/doc/Users guide Apache.idmap.txt +3 -1
- data/doc/Users guide Apache.txt +5 -3
- data/doc/Users guide Nginx.idmap.txt +9 -5
- data/doc/Users guide Nginx.txt +47 -17
- data/doc/users_guide_snippets/environment_variables.txt +2 -2
- data/doc/users_guide_snippets/installation.txt +6 -2
- data/doc/users_guide_snippets/tips.txt +4 -0
- data/ext/apache2/Hooks.cpp +16 -3
- data/ext/common/Account.h +6 -5
- data/ext/common/AgentsStarter.h +1 -1
- data/ext/common/ApplicationPool2/Common.h +72 -0
- data/ext/common/ApplicationPool2/Group.h +263 -148
- data/ext/common/ApplicationPool2/Implementation.cpp +66 -44
- data/ext/common/ApplicationPool2/Options.h +1 -7
- data/ext/common/ApplicationPool2/Pool.h +96 -72
- data/ext/common/ApplicationPool2/Process.h +12 -17
- data/ext/common/ApplicationPool2/Socket.h +4 -4
- data/ext/common/ApplicationPool2/SuperGroup.h +20 -17
- data/ext/common/Constants.h +15 -1
- data/ext/common/MessageServer.h +22 -0
- data/ext/common/Utils.cpp +4 -1
- data/ext/common/Utils.h +3 -1
- data/ext/common/Utils/StrIntUtils.h +1 -0
- data/ext/common/Utils/Timer.h +15 -1
- data/ext/common/Utils/utf8/checked.h +0 -0
- data/ext/common/Utils/utf8/core.h +0 -0
- data/ext/common/Utils/utf8/unchecked.h +0 -0
- data/ext/common/agents/Base.cpp +59 -35
- data/ext/common/agents/HelperAgent/Main.cpp +23 -12
- data/ext/common/agents/HelperAgent/RequestHandler.h +10 -1
- data/ext/common/agents/LoggingAgent/FilterSupport.h +9 -5
- data/ext/common/agents/TempDirToucher.c +12 -3
- data/ext/common/agents/Watchdog/Main.cpp +8 -2
- data/ext/nginx/ConfigurationCommands.c +10 -0
- data/ext/nginx/ConfigurationFields.h +2 -0
- data/ext/nginx/ContentHandler.c +32 -19
- data/ext/nginx/CreateLocationConfig.c +5 -0
- data/ext/nginx/MergeLocationConfig.c +6 -0
- data/ext/nginx/config +13 -6
- data/ext/ruby/passenger_native_support.c +61 -2
- data/helper-scripts/classic-rails-loader.rb +9 -10
- data/helper-scripts/classic-rails-preloader.rb +10 -11
- data/helper-scripts/node-loader.js +3 -2
- data/helper-scripts/rack-loader.rb +8 -9
- data/helper-scripts/rack-preloader.rb +9 -10
- data/lib/phusion_passenger.rb +36 -7
- data/lib/phusion_passenger/abstract_installer.rb +16 -15
- data/lib/phusion_passenger/active_support3_extensions/init.rb +1 -1
- data/lib/phusion_passenger/admin_tools/memory_stats.rb +2 -2
- data/lib/phusion_passenger/admin_tools/server_instance.rb +5 -5
- data/lib/phusion_passenger/analytics_logger.rb +3 -3
- data/lib/phusion_passenger/classic_rails/thread_handler_extension.rb +1 -1
- data/lib/phusion_passenger/config.rb +125 -0
- data/lib/phusion_passenger/config/about_command.rb +183 -0
- data/lib/phusion_passenger/config/command.rb +57 -0
- data/lib/phusion_passenger/config/restart_app_command.rb +146 -0
- data/lib/phusion_passenger/config/utils.rb +108 -0
- data/lib/phusion_passenger/console_text_template.rb +2 -1
- data/lib/phusion_passenger/constants.rb +7 -2
- data/lib/phusion_passenger/loader_shared_helpers.rb +12 -21
- data/lib/phusion_passenger/message_client.rb +15 -4
- data/lib/phusion_passenger/native_support.rb +116 -98
- data/lib/phusion_passenger/nginx/config_options.rb +5 -0
- data/lib/phusion_passenger/platform_info.rb +1 -1
- data/lib/phusion_passenger/platform_info/apache.rb +9 -5
- data/lib/phusion_passenger/platform_info/apache_detector.rb +5 -6
- data/lib/phusion_passenger/platform_info/binary_compatibility.rb +3 -3
- data/lib/phusion_passenger/platform_info/compiler.rb +29 -11
- data/lib/phusion_passenger/platform_info/curl.rb +1 -1
- data/lib/phusion_passenger/platform_info/cxx_portability.rb +30 -16
- data/lib/phusion_passenger/platform_info/depcheck.rb +6 -6
- data/lib/phusion_passenger/platform_info/linux.rb +2 -2
- data/lib/phusion_passenger/platform_info/operating_system.rb +25 -5
- data/lib/phusion_passenger/platform_info/ruby.rb +7 -4
- data/lib/phusion_passenger/platform_info/zlib.rb +1 -1
- data/lib/phusion_passenger/plugin.rb +0 -1
- data/lib/phusion_passenger/preloader_shared_helpers.rb +1 -1
- data/lib/phusion_passenger/public_api.rb +1 -1
- data/lib/phusion_passenger/rack/thread_handler_extension.rb +1 -1
- data/lib/phusion_passenger/request_handler.rb +8 -9
- data/lib/phusion_passenger/request_handler/thread_handler.rb +21 -9
- data/lib/phusion_passenger/ruby_core_enhancements.rb +1 -1
- data/lib/phusion_passenger/standalone/app_finder.rb +2 -2
- data/lib/phusion_passenger/standalone/command.rb +10 -8
- data/lib/phusion_passenger/standalone/help_command.rb +1 -1
- data/lib/phusion_passenger/standalone/main.rb +3 -3
- data/lib/phusion_passenger/standalone/package_runtime_command.rb +2 -2
- data/lib/phusion_passenger/standalone/runtime_installer.rb +55 -13
- data/lib/phusion_passenger/standalone/runtime_locator.rb +3 -3
- data/lib/phusion_passenger/standalone/start_command.rb +6 -7
- data/lib/phusion_passenger/standalone/status_command.rb +1 -1
- data/lib/phusion_passenger/standalone/stop_command.rb +1 -1
- data/lib/phusion_passenger/standalone/utils.rb +1 -1
- data/lib/phusion_passenger/standalone/version_command.rb +2 -3
- data/lib/phusion_passenger/utils.rb +1 -1
- data/lib/phusion_passenger/utils/download.rb +1 -2
- data/lib/phusion_passenger/utils/file_system_watcher.rb +1 -1
- data/lib/phusion_passenger/utils/hosts_file_parser.rb +1 -1
- data/lib/phusion_passenger/utils/tee_input.rb +1 -1
- data/lib/phusion_passenger/utils/terminal_choice_menu.rb +217 -0
- data/lib/phusion_passenger/utils/unseekable_socket.rb +1 -1
- data/resources/templates/apache2/config_snippets.txt.erb +2 -3
- data/resources/templates/apache2/deployment_example.txt.erb +2 -2
- data/resources/templates/apache2/notify_apache_module_installed.txt.erb +3 -0
- data/resources/templates/nginx/config_snippets.txt.erb +1 -1
- data/resources/templates/nginx/deployment_example.txt.erb +2 -2
- data/resources/templates/nginx/nginx_module_sources_not_available.txt.erb +11 -5
- data/rpm/Vagrantfile +1 -0
- data/test/cxx/ApplicationPool2/PoolTest.cpp +224 -35
- data/test/cxx/ApplicationPool2/ProcessTest.cpp +6 -6
- data/test/cxx/MessagePassingTest.cpp +1 -1
- data/test/cxx/RequestHandlerTest.cpp +26 -26
- data/test/integration_tests/apache2_tests.rb +162 -243
- data/test/integration_tests/native_packaging_spec.rb +10 -10
- data/test/integration_tests/nginx_tests.rb +87 -107
- data/test/integration_tests/shared/example_webapp_tests.rb +246 -0
- data/test/integration_tests/source_packaging_test.rb +2 -1
- data/test/integration_tests/standalone_tests.rb +34 -19
- data/test/ruby/admin_tools_spec.rb +4 -4
- data/test/ruby/analytics_logger_spec.rb +1 -1
- data/test/ruby/debug_logging_spec.rb +2 -2
- data/test/ruby/message_channel_spec.rb +1 -1
- data/test/ruby/request_handler_spec.rb +171 -64
- data/test/ruby/shared/loader_sharedspec.rb +5 -5
- data/test/ruby/shared/rails/analytics_logging_extensions_sharedspec.rb +2 -2
- data/test/ruby/spec_helper.rb +4 -4
- data/test/ruby/standalone/runtime_installer_spec.rb +1 -1
- data/test/ruby/standalone/runtime_locator_spec.rb +1 -1
- data/test/ruby/utils/file_system_watcher_spec.rb +1 -1
- data/test/ruby/utils/hosts_file_parser.rb +1 -1
- data/test/ruby/utils/unseekable_socket_spec.rb +1 -1
- data/test/ruby/utils_spec.rb +4 -4
- data/test/stub/apache2/httpd.conf.erb +5 -0
- data/test/stub/index.html +1 -0
- data/test/stub/rack/config.ru +80 -33
- data/test/stub/{rails_apps/1.2/empty/app/models → rack/public}/.gitignore +0 -0
- data/test/stub/{rails_apps/1.2/empty → rails2.3-mycook}/Rakefile +0 -0
- data/test/stub/{rails_apps/2.3/mycook → rails2.3-mycook}/app/controllers/application_controller.rb +0 -0
- data/test/stub/{rails_apps/2.3/mycook → rails2.3-mycook}/app/controllers/recipes_controller.rb +0 -0
- data/test/stub/{rails_apps/2.3/mycook → rails2.3-mycook}/app/controllers/uploads_controller.rb +0 -0
- data/test/stub/{rails_apps/2.3/mycook → rails2.3-mycook}/app/controllers/welcome_controller.rb +0 -0
- data/test/stub/{rails_apps/1.2/empty → rails2.3-mycook}/app/helpers/application_helper.rb +0 -0
- data/test/stub/{rails_apps/2.3/mycook → rails2.3-mycook}/app/helpers/recipes_helper.rb +0 -0
- data/test/stub/{rails_apps/2.3/mycook → rails2.3-mycook}/app/helpers/test_helper.rb +0 -0
- data/test/stub/{rails_apps/2.3/mycook → rails2.3-mycook}/app/helpers/uploads_helper.rb +0 -0
- data/test/stub/{rails_apps/2.3/mycook → rails2.3-mycook}/app/helpers/welcome_helper.rb +0 -0
- data/test/stub/{rails_apps/2.3/mycook → rails2.3-mycook}/app/views/layouts/default.rhtml +0 -0
- data/test/stub/{rails_apps/2.3/mycook → rails2.3-mycook}/app/views/recipes/create.rhtml +0 -0
- data/test/stub/{rails_apps/2.3/mycook → rails2.3-mycook}/app/views/recipes/index.rhtml +0 -0
- data/test/stub/{rails_apps/2.3/mycook → rails2.3-mycook}/app/views/recipes/new.rhtml +0 -0
- data/test/stub/{rails_apps/2.3/mycook → rails2.3-mycook}/app/views/uploads/index.rhtml +0 -0
- data/test/stub/{rails_apps/2.3/mycook → rails2.3-mycook}/app/views/uploads/new.html.erb +0 -0
- data/test/stub/{rails_apps/2.3/mycook → rails2.3-mycook}/app/views/welcome/cached.rhtml +0 -0
- data/test/stub/{rails_apps/2.3/mycook → rails2.3-mycook}/app/views/welcome/index.rhtml +0 -0
- data/test/stub/{rails_apps/2.3/mycook → rails2.3-mycook}/config/boot.rb +0 -0
- data/test/stub/{rails_apps/2.3/mycook → rails2.3-mycook}/config/database.yml +0 -0
- data/test/stub/{rails_apps/2.3/mycook → rails2.3-mycook}/config/environment.rb +0 -0
- data/test/stub/{rails_apps/2.0/empty → rails2.3-mycook}/config/environments/development.rb +0 -0
- data/test/stub/{rails_apps/2.3/mycook → rails2.3-mycook}/config/environments/production.rb +0 -0
- data/test/stub/{rails_apps/2.0/empty → rails2.3-mycook}/config/initializers/inflections.rb +0 -0
- data/test/stub/{rails_apps/2.0/empty → rails2.3-mycook}/config/initializers/mime_types.rb +0 -0
- data/test/stub/{rails_apps/2.3/mycook → rails2.3-mycook}/config/routes.rb +0 -0
- data/test/stub/{rails_apps/2.3/mycook → rails2.3-mycook}/log/useless.txt +0 -0
- data/test/stub/{rails_apps/2.3/mycook → rails2.3-mycook}/public/.htaccess +0 -0
- data/test/stub/{rails_apps/1.2/empty → rails2.3-mycook}/public/404.html +0 -0
- data/test/stub/{rails_apps/2.0/empty → rails2.3-mycook}/public/422.html +0 -0
- data/test/stub/{rails_apps/2.0/empty → rails2.3-mycook}/public/500.html +0 -0
- data/test/stub/{rails_apps/2.3/mycook → rails2.3-mycook}/public/dispatch.cgi +0 -0
- data/test/stub/{rails_apps/2.3/mycook → rails2.3-mycook}/public/dispatch.fcgi +0 -0
- data/test/stub/{rails_apps/2.3/mycook → rails2.3-mycook}/public/dispatch.rb +0 -0
- data/test/stub/{rails_apps/1.2/empty → rails2.3-mycook}/public/favicon.ico +0 -0
- data/test/stub/{rails_apps/2.3/mycook → rails2.3-mycook}/public/images/angrywizard.gif +0 -0
- data/test/stub/{rails_apps/2.3/mycook → rails2.3-mycook}/public/images/cookbook.gif +0 -0
- data/test/stub/{rails_apps/2.3/mycook → rails2.3-mycook}/public/images/header.png +0 -0
- data/test/stub/{rails_apps/1.2/empty → rails2.3-mycook}/public/images/rails.png +0 -0
- data/test/stub/{rails_apps/2.0/empty → rails2.3-mycook}/public/robots.txt +0 -0
- data/test/stub/{rails_apps/2.3/mycook → rails2.3-mycook}/public/uploads.html +0 -0
- data/test/stub/{rails_apps/1.2/empty/db → rails2.3-mycook/public/uploads}/.gitignore +0 -0
- data/test/stub/{rails_apps/2.3/mycook → rails2.3-mycook}/public/welcome/cached.html +0 -0
- data/test/stub/{rails_apps/2.0/empty → rails2.3-mycook}/script/about +0 -0
- data/test/stub/{rails_apps/2.0/empty → rails2.3-mycook}/script/console +0 -0
- data/test/stub/{rails_apps/2.2/empty → rails2.3-mycook}/script/dbconsole +0 -0
- data/test/stub/{rails_apps/2.0/empty → rails2.3-mycook}/script/destroy +0 -0
- data/test/stub/{rails_apps/2.0/empty → rails2.3-mycook}/script/generate +0 -0
- data/test/stub/{rails_apps/1.2/empty → rails2.3-mycook}/script/performance/benchmarker +0 -0
- data/test/stub/{rails_apps/1.2/empty → rails2.3-mycook}/script/performance/profiler +0 -0
- data/test/stub/{rails_apps/2.0/empty → rails2.3-mycook}/script/performance/request +0 -0
- data/test/stub/{rails_apps/2.0/empty → rails2.3-mycook}/script/plugin +0 -0
- data/test/stub/{rails_apps/1.2/empty → rails2.3-mycook}/script/process/inspector +0 -0
- data/test/stub/{rails_apps/1.2/empty → rails2.3-mycook}/script/process/reaper +0 -0
- data/test/stub/{rails_apps/1.2/empty → rails2.3-mycook}/script/process/spawner +0 -0
- data/test/stub/{rails_apps/2.0/empty → rails2.3-mycook}/script/runner +0 -0
- data/test/stub/{rails_apps/2.0/empty → rails2.3-mycook}/script/server +0 -0
- data/test/stub/{rails_apps/2.3/mycook → rails2.3-mycook}/sites/some.site/public/uploads.html +0 -0
- data/test/stub/{rails_apps/2.3/mycook → rails2.3-mycook}/sites/some.site/public/welcome/cached.html +0 -0
- data/test/stub/{rails_apps/2.3/mycook → rails2.3-mycook}/tmp/cache/useless.txt +0 -0
- data/test/stub/{rails_apps/2.3/mycook → rails2.3-mycook}/tmp/pids/useless.txt +0 -0
- data/test/stub/{rails_apps/2.3/mycook → rails2.3-mycook}/tmp/sessions/useless.txt +0 -0
- data/test/stub/{rails_apps/2.3/mycook → rails2.3-mycook}/tmp/sockets/useless.txt +0 -0
- data/test/stub/rails2.3/app/controllers/foo_controller.rb +1 -1
- data/test/stub/rails2.3/config/routes.rb +1 -2
- data/test/stub/wsgi/passenger_wsgi.py +47 -8
- data/test/stub/{rails_apps/1.2/empty/public/stylesheets → wsgi/public}/.gitignore +0 -0
- data/test/support/apache2_controller.rb +2 -2
- data/test/support/nginx_controller.rb +11 -5
- data/test/support/placebo-preloader.rb +2 -2
- data/test/support/test_helper.rb +26 -7
- metadata +78 -240
- metadata.gz.asc +7 -7
- data/debian.template/repack.sh +0 -42
- data/debian.template/watch +0 -3
- data/test/integration_tests/cgi_environment_spec.rb +0 -36
- data/test/integration_tests/hello_world_rack_spec.rb +0 -43
- data/test/integration_tests/hello_world_wsgi_spec.rb +0 -41
- data/test/integration_tests/mycook_spec.rb +0 -166
- data/test/stub/rack/public/rack.jpg +0 -0
- data/test/stub/rails_apps/1.2/empty/.gitignore +0 -3
- data/test/stub/rails_apps/1.2/empty/app/controllers/application.rb +0 -7
- data/test/stub/rails_apps/1.2/empty/config/boot.rb +0 -108
- data/test/stub/rails_apps/1.2/empty/config/database.yml +0 -31
- data/test/stub/rails_apps/1.2/empty/config/environment.rb +0 -66
- data/test/stub/rails_apps/1.2/empty/config/environments/development.rb +0 -21
- data/test/stub/rails_apps/1.2/empty/config/environments/production.rb +0 -18
- data/test/stub/rails_apps/1.2/empty/config/environments/staging.rb +0 -18
- data/test/stub/rails_apps/1.2/empty/config/environments/test.rb +0 -19
- data/test/stub/rails_apps/1.2/empty/config/routes.rb +0 -23
- data/test/stub/rails_apps/1.2/empty/doc/README_FOR_APP +0 -2
- data/test/stub/rails_apps/1.2/empty/public/.htaccess +0 -40
- data/test/stub/rails_apps/1.2/empty/public/500.html +0 -30
- data/test/stub/rails_apps/1.2/empty/public/dispatch.cgi +0 -10
- data/test/stub/rails_apps/1.2/empty/public/dispatch.fcgi +0 -24
- data/test/stub/rails_apps/1.2/empty/public/dispatch.rb +0 -10
- data/test/stub/rails_apps/1.2/empty/public/robots.txt +0 -1
- data/test/stub/rails_apps/1.2/empty/script/about +0 -3
- data/test/stub/rails_apps/1.2/empty/script/breakpointer +0 -3
- data/test/stub/rails_apps/1.2/empty/script/console +0 -3
- data/test/stub/rails_apps/1.2/empty/script/destroy +0 -3
- data/test/stub/rails_apps/1.2/empty/script/generate +0 -3
- data/test/stub/rails_apps/1.2/empty/script/plugin +0 -3
- data/test/stub/rails_apps/1.2/empty/script/runner +0 -3
- data/test/stub/rails_apps/1.2/empty/script/server +0 -3
- data/test/stub/rails_apps/1.2/empty/test/test_helper.rb +0 -28
- data/test/stub/rails_apps/2.0/empty/.gitignore +0 -3
- data/test/stub/rails_apps/2.0/empty/Rakefile +0 -10
- data/test/stub/rails_apps/2.0/empty/app/controllers/application.rb +0 -10
- data/test/stub/rails_apps/2.0/empty/app/helpers/application_helper.rb +0 -3
- data/test/stub/rails_apps/2.0/empty/app/models/.gitignore +0 -0
- data/test/stub/rails_apps/2.0/empty/config/boot.rb +0 -108
- data/test/stub/rails_apps/2.0/empty/config/database.yml +0 -31
- data/test/stub/rails_apps/2.0/empty/config/environment.rb +0 -59
- data/test/stub/rails_apps/2.0/empty/config/environments/production.rb +0 -18
- data/test/stub/rails_apps/2.0/empty/config/environments/staging.rb +0 -18
- data/test/stub/rails_apps/2.0/empty/config/environments/test.rb +0 -22
- data/test/stub/rails_apps/2.0/empty/config/routes.rb +0 -35
- data/test/stub/rails_apps/2.0/empty/db/.gitignore +0 -0
- data/test/stub/rails_apps/2.0/empty/doc/README_FOR_APP +0 -2
- data/test/stub/rails_apps/2.0/empty/public/.htaccess +0 -40
- data/test/stub/rails_apps/2.0/empty/public/404.html +0 -30
- data/test/stub/rails_apps/2.0/empty/public/dispatch.cgi +0 -10
- data/test/stub/rails_apps/2.0/empty/public/dispatch.fcgi +0 -24
- data/test/stub/rails_apps/2.0/empty/public/dispatch.rb +0 -10
- data/test/stub/rails_apps/2.0/empty/public/favicon.ico +0 -0
- data/test/stub/rails_apps/2.0/empty/public/images/rails.png +0 -0
- data/test/stub/rails_apps/2.0/empty/public/stylesheets/.gitignore +0 -0
- data/test/stub/rails_apps/2.0/empty/script/performance/benchmarker +0 -3
- data/test/stub/rails_apps/2.0/empty/script/performance/profiler +0 -3
- data/test/stub/rails_apps/2.0/empty/script/process/inspector +0 -3
- data/test/stub/rails_apps/2.0/empty/script/process/reaper +0 -3
- data/test/stub/rails_apps/2.0/empty/script/process/spawner +0 -3
- data/test/stub/rails_apps/2.0/empty/test/test_helper.rb +0 -38
- data/test/stub/rails_apps/2.2/empty/.gitignore +0 -3
- data/test/stub/rails_apps/2.2/empty/Rakefile +0 -10
- data/test/stub/rails_apps/2.2/empty/app/controllers/application.rb +0 -15
- data/test/stub/rails_apps/2.2/empty/app/helpers/application_helper.rb +0 -3
- data/test/stub/rails_apps/2.2/empty/app/models/.gitignore +0 -0
- data/test/stub/rails_apps/2.2/empty/config/boot.rb +0 -109
- data/test/stub/rails_apps/2.2/empty/config/database.yml +0 -31
- data/test/stub/rails_apps/2.2/empty/config/environment.rb +0 -75
- data/test/stub/rails_apps/2.2/empty/config/environments/development.rb +0 -17
- data/test/stub/rails_apps/2.2/empty/config/environments/production.rb +0 -24
- data/test/stub/rails_apps/2.2/empty/config/environments/staging.rb +0 -24
- data/test/stub/rails_apps/2.2/empty/config/environments/test.rb +0 -22
- data/test/stub/rails_apps/2.2/empty/config/initializers/inflections.rb +0 -10
- data/test/stub/rails_apps/2.2/empty/config/initializers/mime_types.rb +0 -5
- data/test/stub/rails_apps/2.2/empty/config/initializers/new_rails_defaults.rb +0 -17
- data/test/stub/rails_apps/2.2/empty/config/locales/en.yml +0 -5
- data/test/stub/rails_apps/2.2/empty/config/routes.rb +0 -43
- data/test/stub/rails_apps/2.2/empty/db/.gitignore +0 -0
- data/test/stub/rails_apps/2.2/empty/doc/README_FOR_APP +0 -5
- data/test/stub/rails_apps/2.2/empty/public/404.html +0 -30
- data/test/stub/rails_apps/2.2/empty/public/422.html +0 -30
- data/test/stub/rails_apps/2.2/empty/public/500.html +0 -33
- data/test/stub/rails_apps/2.2/empty/public/dispatch.cgi +0 -10
- data/test/stub/rails_apps/2.2/empty/public/dispatch.fcgi +0 -24
- data/test/stub/rails_apps/2.2/empty/public/dispatch.rb +0 -10
- data/test/stub/rails_apps/2.2/empty/public/favicon.ico +0 -0
- data/test/stub/rails_apps/2.2/empty/public/images/rails.png +0 -0
- data/test/stub/rails_apps/2.2/empty/public/robots.txt +0 -5
- data/test/stub/rails_apps/2.2/empty/public/stylesheets/.gitignore +0 -0
- data/test/stub/rails_apps/2.2/empty/script/about +0 -4
- data/test/stub/rails_apps/2.2/empty/script/console +0 -3
- data/test/stub/rails_apps/2.2/empty/script/destroy +0 -3
- data/test/stub/rails_apps/2.2/empty/script/generate +0 -3
- data/test/stub/rails_apps/2.2/empty/script/performance/benchmarker +0 -3
- data/test/stub/rails_apps/2.2/empty/script/performance/profiler +0 -3
- data/test/stub/rails_apps/2.2/empty/script/performance/request +0 -3
- data/test/stub/rails_apps/2.2/empty/script/plugin +0 -3
- data/test/stub/rails_apps/2.2/empty/script/process/inspector +0 -3
- data/test/stub/rails_apps/2.2/empty/script/process/reaper +0 -3
- data/test/stub/rails_apps/2.2/empty/script/process/spawner +0 -3
- data/test/stub/rails_apps/2.2/empty/script/runner +0 -3
- data/test/stub/rails_apps/2.2/empty/script/server +0 -3
- data/test/stub/rails_apps/2.2/empty/test/performance/browsing_test.rb +0 -9
- data/test/stub/rails_apps/2.2/empty/test/test_helper.rb +0 -38
- data/test/stub/rails_apps/2.3/empty/.gitignore +0 -3
- data/test/stub/rails_apps/2.3/empty/Rakefile +0 -10
- data/test/stub/rails_apps/2.3/empty/app/controllers/application_controller.rb +0 -10
- data/test/stub/rails_apps/2.3/empty/app/helpers/application_helper.rb +0 -3
- data/test/stub/rails_apps/2.3/empty/app/models/.gitignore +0 -0
- data/test/stub/rails_apps/2.3/empty/config/boot.rb +0 -110
- data/test/stub/rails_apps/2.3/empty/config/database.yml +0 -31
- data/test/stub/rails_apps/2.3/empty/config/environment.rb +0 -41
- data/test/stub/rails_apps/2.3/empty/config/environments/development.rb +0 -17
- data/test/stub/rails_apps/2.3/empty/config/environments/production.rb +0 -28
- data/test/stub/rails_apps/2.3/empty/config/environments/staging.rb +0 -28
- data/test/stub/rails_apps/2.3/empty/config/environments/test.rb +0 -28
- data/test/stub/rails_apps/2.3/empty/config/initializers/backtrace_silencers.rb +0 -7
- data/test/stub/rails_apps/2.3/empty/config/initializers/inflections.rb +0 -10
- data/test/stub/rails_apps/2.3/empty/config/initializers/mime_types.rb +0 -5
- data/test/stub/rails_apps/2.3/empty/config/initializers/new_rails_defaults.rb +0 -21
- data/test/stub/rails_apps/2.3/empty/config/initializers/session_store.rb +0 -15
- data/test/stub/rails_apps/2.3/empty/config/locales/en.yml +0 -5
- data/test/stub/rails_apps/2.3/empty/config/routes.rb +0 -43
- data/test/stub/rails_apps/2.3/empty/db/.gitignore +0 -0
- data/test/stub/rails_apps/2.3/empty/db/seeds.rb +0 -7
- data/test/stub/rails_apps/2.3/empty/doc/README_FOR_APP +0 -2
- data/test/stub/rails_apps/2.3/empty/public/404.html +0 -30
- data/test/stub/rails_apps/2.3/empty/public/422.html +0 -30
- data/test/stub/rails_apps/2.3/empty/public/500.html +0 -30
- data/test/stub/rails_apps/2.3/empty/public/favicon.ico +0 -0
- data/test/stub/rails_apps/2.3/empty/public/images/rails.png +0 -0
- data/test/stub/rails_apps/2.3/empty/public/robots.txt +0 -5
- data/test/stub/rails_apps/2.3/empty/public/stylesheets/.gitignore +0 -0
- data/test/stub/rails_apps/2.3/empty/script/about +0 -4
- data/test/stub/rails_apps/2.3/empty/script/console +0 -3
- data/test/stub/rails_apps/2.3/empty/script/dbconsole +0 -3
- data/test/stub/rails_apps/2.3/empty/script/destroy +0 -3
- data/test/stub/rails_apps/2.3/empty/script/generate +0 -3
- data/test/stub/rails_apps/2.3/empty/script/performance/benchmarker +0 -3
- data/test/stub/rails_apps/2.3/empty/script/performance/profiler +0 -3
- data/test/stub/rails_apps/2.3/empty/script/plugin +0 -3
- data/test/stub/rails_apps/2.3/empty/script/runner +0 -3
- data/test/stub/rails_apps/2.3/empty/script/server +0 -3
- data/test/stub/rails_apps/2.3/empty/test/performance/browsing_test.rb +0 -9
- data/test/stub/rails_apps/2.3/empty/test/test_helper.rb +0 -38
- data/test/stub/rails_apps/2.3/mycook/Rakefile +0 -10
- data/test/stub/rails_apps/2.3/mycook/app/helpers/application_helper.rb +0 -3
- data/test/stub/rails_apps/2.3/mycook/config/environments/development.rb +0 -18
- data/test/stub/rails_apps/2.3/mycook/config/initializers/inflections.rb +0 -10
- data/test/stub/rails_apps/2.3/mycook/config/initializers/mime_types.rb +0 -5
- data/test/stub/rails_apps/2.3/mycook/public/404.html +0 -30
- data/test/stub/rails_apps/2.3/mycook/public/422.html +0 -30
- data/test/stub/rails_apps/2.3/mycook/public/500.html +0 -30
- data/test/stub/rails_apps/2.3/mycook/public/favicon.ico +0 -0
- data/test/stub/rails_apps/2.3/mycook/public/images/rails.png +0 -0
- data/test/stub/rails_apps/2.3/mycook/public/robots.txt +0 -5
- data/test/stub/rails_apps/2.3/mycook/public/uploads/.gitignore +0 -0
- data/test/stub/rails_apps/2.3/mycook/script/about +0 -3
- data/test/stub/rails_apps/2.3/mycook/script/console +0 -3
- data/test/stub/rails_apps/2.3/mycook/script/dbconsole +0 -3
- data/test/stub/rails_apps/2.3/mycook/script/destroy +0 -3
- data/test/stub/rails_apps/2.3/mycook/script/generate +0 -3
- data/test/stub/rails_apps/2.3/mycook/script/performance/benchmarker +0 -3
- data/test/stub/rails_apps/2.3/mycook/script/performance/profiler +0 -3
- data/test/stub/rails_apps/2.3/mycook/script/performance/request +0 -3
- data/test/stub/rails_apps/2.3/mycook/script/plugin +0 -3
- data/test/stub/rails_apps/2.3/mycook/script/process/inspector +0 -3
- data/test/stub/rails_apps/2.3/mycook/script/process/reaper +0 -3
- data/test/stub/rails_apps/2.3/mycook/script/process/spawner +0 -3
- data/test/stub/rails_apps/2.3/mycook/script/runner +0 -3
- data/test/stub/rails_apps/2.3/mycook/script/server +0 -3
- data/test/stub/wsgi/public/wsgi-snake.jpg +0 -0
data/build/ruby_tests.rb
CHANGED
@@ -29,8 +29,12 @@ task 'test:ruby' => dependencies do
|
|
29
29
|
if PlatformInfo.rspec.nil?
|
30
30
|
abort "RSpec is not installed for Ruby interpreter '#{PlatformInfo.ruby_command}'. Please install it."
|
31
31
|
else
|
32
|
+
if maybe_grep = string_option('E')
|
33
|
+
require 'shellwords'
|
34
|
+
maybe_grep = "-e #{Shellwords.escape(maybe_grep)}"
|
35
|
+
end
|
32
36
|
Dir.chdir("test") do
|
33
|
-
ruby "#{PlatformInfo.rspec} -c -f s -P 'dont-autoload-anything' ruby/*_spec.rb ruby/*/*_spec.rb"
|
37
|
+
ruby "#{PlatformInfo.rspec} -c -f s -P 'dont-autoload-anything' #{maybe_grep} ruby/*_spec.rb ruby/*/*_spec.rb"
|
34
38
|
end
|
35
39
|
end
|
36
40
|
end
|
data/build/test_basics.rb
CHANGED
@@ -24,8 +24,7 @@
|
|
24
24
|
TEST_BOOST_OXT_LIBRARY = LIBBOOST_OXT
|
25
25
|
TEST_COMMON_LIBRARY = COMMON_LIBRARY
|
26
26
|
|
27
|
-
TEST_COMMON_CFLAGS = "-DTESTING_APPLICATION_POOL "
|
28
|
-
"#{EXTRA_CXXFLAGS}"
|
27
|
+
TEST_COMMON_CFLAGS = "-DTESTING_APPLICATION_POOL #{EXTRA_CXXFLAGS}"
|
29
28
|
|
30
29
|
desc "Run all unit tests and integration tests"
|
31
30
|
task :test => ['test:oxt', 'test:cxx', 'test:ruby', 'test:node', 'test:integration']
|
@@ -39,7 +39,8 @@ override_dh_auto_install:
|
|
39
39
|
# Merge Ruby 1.8 and 1.9 files into a single directory.
|
40
40
|
cp -a pkg/fakeroot1.8/* debian/tmp/
|
41
41
|
cp -a pkg/fakeroot1.9.1/* debian/tmp/
|
42
|
-
|
42
|
+
./dev/install_scripts_bootstrap_code.rb --ruby /usr/lib/ruby/vendor_ruby debian/tmp/usr/bin/* debian/tmp/usr/sbin/*
|
43
|
+
./dev/install_scripts_bootstrap_code.rb --nginx-module-config /usr/bin debian/tmp/usr/share/<%= PhusionPassenger::GLOBAL_NAMESPACE_DIRNAME %>/ngx_http_passenger_module/config
|
43
44
|
touch debian/tmp/usr/share/<%= PhusionPassenger::GLOBAL_NAMESPACE_DIRNAME %>/release.txt
|
44
45
|
|
45
46
|
override_dh_auto_clean:
|
@@ -0,0 +1,42 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# encoding: utf-8
|
3
|
+
|
4
|
+
# This script changes the bootstrap code for all Phusion Passenger commands,
|
5
|
+
# as well as the Nginx module config script, so that they work no
|
6
|
+
# matter which Ruby interpreter is currently in $PATH, and no matter how
|
7
|
+
# Phusion Passenger is packaged.
|
8
|
+
#
|
9
|
+
# The bootstrap code must not add ruby_libdir to $LOAD_PATH. The active Ruby
|
10
|
+
# can be *any* Ruby interpreter, maybe not even MRI. ruby_libdir belongs to
|
11
|
+
# a Ruby interpreter installed by the distribution, and the files in it may
|
12
|
+
# may be incompatible with the active Ruby.
|
13
|
+
|
14
|
+
type = ARGV.shift
|
15
|
+
|
16
|
+
if type == "--ruby"
|
17
|
+
ruby_libdir = ARGV.shift
|
18
|
+
BOOTSTRAP_CODE = %Q{
|
19
|
+
ENV["PASSENGER_LOCATION_CONFIGURATION_FILE"] = "#{ruby_libdir}/phusion_passenger/locations.ini"
|
20
|
+
require '#{ruby_libdir}/phusion_passenger'
|
21
|
+
}
|
22
|
+
elsif type == "--nginx-module-config"
|
23
|
+
bindir = ARGV.shift
|
24
|
+
BOOTSTRAP_CODE = %Q{
|
25
|
+
PASSENGER_CONFIG=#{bindir}/passenger-config
|
26
|
+
}
|
27
|
+
else
|
28
|
+
abort "Invalid type"
|
29
|
+
end
|
30
|
+
BOOTSTRAP_CODE.gsub!(/^\t\t/, '').strip
|
31
|
+
|
32
|
+
ARGV.each do |filename|
|
33
|
+
File.open(filename, "r+") do |f|
|
34
|
+
text = f.read
|
35
|
+
text.sub!(
|
36
|
+
/^## Magic comment: begin bootstrap ##.*## Magic comment: end bootstrap \#\#$/m,
|
37
|
+
BOOTSTRAP_CODE)
|
38
|
+
f.rewind
|
39
|
+
f.truncate(0)
|
40
|
+
f.write(text)
|
41
|
+
end
|
42
|
+
end
|
data/dev/run_travis.sh
CHANGED
@@ -139,6 +139,7 @@ if [[ "$TEST_DEBIAN_PACKAGING" = 1 ]]; then
|
|
139
139
|
run rake debian:dev debian:dev:reinstall
|
140
140
|
run rake test:integration:native_packaging \
|
141
141
|
LOCATIONS_INI=/usr/lib/ruby/vendor_ruby/phusion_passenger/locations.ini \
|
142
|
+
NATIVE_PACKAGING_METHOD=deb \
|
142
143
|
SUDO=1
|
143
144
|
run env PASSENGER_LOCATION_CONFIGURATION_FILE=/usr/lib/ruby/vendor_ruby/phusion_passenger/locations.ini \
|
144
145
|
rake test:integration:apache2 SUDO=1
|
data/dev/runner
ADDED
@@ -0,0 +1,27 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
require File.expand_path(File.dirname(__FILE__) + "/../lib/phusion_passenger")
|
3
|
+
PhusionPassenger.locate_directories
|
4
|
+
|
5
|
+
while true
|
6
|
+
if ARGV[0] =~ /^-r(.*)/
|
7
|
+
if $1.empty?
|
8
|
+
lib = ARGV[1]
|
9
|
+
ARGV.shift
|
10
|
+
ARGV.shift
|
11
|
+
else
|
12
|
+
lib = $1
|
13
|
+
ARGV.shift
|
14
|
+
end
|
15
|
+
begin
|
16
|
+
PhusionPassenger.require_passenger_lib(lib)
|
17
|
+
rescue LoadError
|
18
|
+
require(lib)
|
19
|
+
end
|
20
|
+
else
|
21
|
+
break
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
module PhusionPassenger
|
26
|
+
p eval(ARGV.join(" "))
|
27
|
+
end
|
data/doc/Packaging.txt.md
CHANGED
@@ -43,8 +43,9 @@ package. This configuration comes not only with all necessary binaries, but also
|
|
43
43
|
with some (but not all) source files. This is because when you run Phusion Passenger
|
44
44
|
with a different Ruby interpreter than the packager intended, Phusion Passenger
|
45
45
|
must be able to compile a new Ruby extension for that Ruby interpreter. This
|
46
|
-
configuration does not however allow compiling against a different Apache
|
47
|
-
|
46
|
+
configuration does not however allow compiling against a different Apache version
|
47
|
+
than the packager intended (but does allow compiling against a different Nginx
|
48
|
+
version).
|
48
49
|
|
49
50
|
In this configuration, files can be scattered anywhere throughout the filesystem. This
|
50
51
|
way Phusion Passenger can be packaged in an FHS-compliant way. The exact locations
|
@@ -52,14 +53,8 @@ of the different types of files can be specified through a
|
|
52
53
|
_location configuration file_. The existance and usage of a location configuration
|
53
54
|
file does not automatically imply that Phusion Passenger is natively packaged.
|
54
55
|
|
55
|
-
|
56
|
-
|
57
|
-
against a different Ruby version. Passenger Standlone looks for its binaries
|
58
|
-
in the location as specified by the location configuration file; it makes no
|
59
|
-
attempt to compile anything, except of course for the Ruby extension.
|
60
|
-
|
61
|
-
If either the non-Standalone or the Standalone Passenger needs to have a new Ruby
|
62
|
-
extension compiled, then it will store that in `~/.passenger/native_support/<VERSION>/<ARCH>`.
|
56
|
+
If Phusion Passenger needs to have a new Ruby extension compiled, then it will
|
57
|
+
store that in `~/.passenger/native_support/<VERSION>/<ARCH>`.
|
63
58
|
|
64
59
|
|
65
60
|
# The location configuration file
|
@@ -338,7 +338,9 @@
|
|
338
338
|
|
339
339
|
11.9.4. Error handling => error-handling-1a1uvod
|
340
340
|
|
341
|
-
11.9.5.
|
341
|
+
11.9.5. Compatibility => compatibility-18tl6g3
|
342
|
+
|
343
|
+
11.9.6. Available hooks => available-hooks-159anc3
|
342
344
|
|
343
345
|
11.10. Flying Passenger => flying-passenger-q916f7
|
344
346
|
|
data/doc/Users guide Apache.txt
CHANGED
@@ -513,7 +513,7 @@ Please refer to link:https://github.com/phusion/passenger/wiki/Phusion-Passenger
|
|
513
513
|
|
514
514
|
== Deploying a Meteor application
|
515
515
|
|
516
|
-
Please refer to link:
|
516
|
+
Please refer to link:https://github.com/phusion/passenger/wiki/Phusion-Passenger:-Meteor-tutorial[the Meteor tutorial].
|
517
517
|
|
518
518
|
|
519
519
|
== Configuring Phusion Passenger ==
|
@@ -795,8 +795,8 @@ directory that's readable by Apache, but only writable by administrators.
|
|
795
795
|
:version: 3.0.0
|
796
796
|
include::users_guide_snippets/enterprise_only.txt[]
|
797
797
|
|
798
|
-
Enables or disables support for rolling restarts. Normally when you
|
799
|
-
restart an application
|
798
|
+
Enables or disables support for rolling restarts through restart.txt. Normally when you
|
799
|
+
restart an application by touching restart.txt, Phusion Passenger would
|
800
800
|
shut down all application processes and spawn a new one. The spawning
|
801
801
|
of a new application process could take a while, and any requests that
|
802
802
|
come in during this time will be blocked until this first application
|
@@ -822,6 +822,8 @@ Rolling restarts have a few caveat however that you should be aware of:
|
|
822
822
|
been restarted. It is for this reason that you should not use rolling
|
823
823
|
restarts in development, only in production.
|
824
824
|
|
825
|
+
Please note that this option is completely unrelated to the `passenger-config restart` command. That command always initiates a blocking restart, unless `--rolling-restart` is given.
|
826
|
+
|
825
827
|
This option may occur in the following places:
|
826
828
|
|
827
829
|
* In the global server configuration.
|
@@ -148,13 +148,15 @@
|
|
148
148
|
|
149
149
|
8.2.9. passenger_base_uri <uri> => passenger-base-uri-uri--1xtuo50
|
150
150
|
|
151
|
-
8.2.10.
|
151
|
+
8.2.10. passenger_document_root <path> => passenger-document-root-path--1pge8kd
|
152
152
|
|
153
|
-
8.2.11.
|
153
|
+
8.2.11. passenger_spawn_method <string> => passenger-spawn-method-string--1sc6njl
|
154
154
|
|
155
|
-
8.2.12.
|
155
|
+
8.2.12. passenger_load_shell_envvars <on|off> => passenger-load-shell-envvars-on-off--fw5u4l
|
156
156
|
|
157
|
-
8.2.13.
|
157
|
+
8.2.13. passenger_rolling_restarts <on|off> => passenger-rolling-restarts
|
158
|
+
|
159
|
+
8.2.14. passenger_resist_deployment_errors <on|off> => passenger-resist-deployment-errors-on-off--k9yf1
|
158
160
|
|
159
161
|
8.3. Connection handling options => connection-handling-options-8jgq90
|
160
162
|
|
@@ -308,7 +310,9 @@
|
|
308
310
|
|
309
311
|
11.9.4. Error handling => error-handling-m78oxs
|
310
312
|
|
311
|
-
11.9.5.
|
313
|
+
11.9.5. Compatibility => compatibility-132b3ns
|
314
|
+
|
315
|
+
11.9.6. Available hooks => available-hooks-11w1prq
|
312
316
|
|
313
317
|
11.10. Flying Passenger => flying-passenger-137qg5e
|
314
318
|
|
data/doc/Users guide Nginx.txt
CHANGED
@@ -90,10 +90,11 @@ And you want your Rails application, located in `/websites/rails`, to be accessi
|
|
90
90
|
To do this, you need to perform the following:
|
91
91
|
|
92
92
|
1. Create a `location` with parameter `~ ^/<SUBURI>(/.*|$)`. This is a regular expression that says: "match everything that is exactly <SUBURI>, or starts with <SUBDURI>/".
|
93
|
-
2. Inside the location block, set `
|
94
|
-
3. Inside the location block, set `
|
93
|
+
2. Inside the location block, set `alias <PATH TO YOUR APPLICATION'S PUBLIC DIRECTORY>$1`.
|
94
|
+
3. Inside the location block, set `passenger_base_uri <SUBURI>`.
|
95
95
|
4. Inside the location block, set `passenger_app_root <PATH TO YOUR APPLICATION ROOT>`.
|
96
|
-
5. Inside the location block,
|
96
|
+
5. Inside the location block, set `passenger_document_root <PATH TO YOUR APPLICATION'S PUBLIC DIRECTORY>`.
|
97
|
+
6. Inside the location block, re-specify `passenger_enabled on`.
|
97
98
|
|
98
99
|
Here is an example:
|
99
100
|
|
@@ -108,9 +109,10 @@ http {
|
|
108
109
|
|
109
110
|
# This block has been added.
|
110
111
|
location ~ ^/subapp(/.*|$) {
|
111
|
-
passenger_base_uri /subapp;
|
112
112
|
alias /websites/rails/public$1; # <-- be sure to point to 'public'!
|
113
|
+
passenger_base_uri /subapp;
|
113
114
|
passenger_app_root /websites/rails;
|
115
|
+
passenger_document_root /websites/rails/public;
|
114
116
|
passenger_enabled on;
|
115
117
|
}
|
116
118
|
}
|
@@ -281,10 +283,11 @@ And you want your Rack application, located in `/websites/rack`, to be accessibl
|
|
281
283
|
To do this, you need to perform the following:
|
282
284
|
|
283
285
|
1. Create a `location` with parameter `~ ^/<SUBURI>(/.*|$)`. This is a regular expression that says: "match everything that is exactly <SUBURI>, or starts with <SUBDURI>/".
|
284
|
-
2. Inside the location block, set `
|
285
|
-
3. Inside the location block, set `
|
286
|
+
2. Inside the location block, set `alias <PATH TO YOUR APPLICATION'S PUBLIC DIRECTORY>$1`.
|
287
|
+
3. Inside the location block, set `passenger_base_uri <SUBURI>`.
|
286
288
|
4. Inside the location block, set `passenger_app_root <PATH TO YOUR APPLICATION ROOT>`.
|
287
|
-
5. Inside the location block,
|
289
|
+
5. Inside the location block, set `passenger_document_root <PATH TO YOUR APPLICATION'S PUBLIC DIRECTORY>`.
|
290
|
+
6. Inside the location block, re-specify `passenger_enabled on`.
|
288
291
|
|
289
292
|
Here is an example:
|
290
293
|
|
@@ -299,9 +302,10 @@ http {
|
|
299
302
|
|
300
303
|
# This block has been added.
|
301
304
|
location ~ ^/subapp(/.*|$) {
|
302
|
-
passenger_base_uri /subapp;
|
303
305
|
alias /websites/rack/public$1; # <-- be sure to point to 'public'!
|
306
|
+
passenger_base_uri /subapp;
|
304
307
|
passenger_app_root /websites/rack;
|
308
|
+
passenger_document_root /websites/rack/public;
|
305
309
|
passenger_enabled on;
|
306
310
|
}
|
307
311
|
}
|
@@ -441,10 +445,11 @@ And you want your WSGI application, located in `/websites/wsgi`, to be accessibl
|
|
441
445
|
To do this, you need to perform the following:
|
442
446
|
|
443
447
|
1. Create a `location` with parameter `~ ^/<SUBURI>(/.*|$)`. This is a regular expression that says: "match everything that is exactly <SUBURI>, or starts with <SUBDURI>/".
|
444
|
-
2. Inside the location block, set `
|
445
|
-
3. Inside the location block, set `
|
448
|
+
2. Inside the location block, set `alias <PATH TO YOUR APPLICATION'S PUBLIC DIRECTORY>$1`.
|
449
|
+
3. Inside the location block, set `passenger_base_uri <SUBURI>`.
|
446
450
|
4. Inside the location block, set `passenger_app_root <PATH TO YOUR APPLICATION ROOT>`.
|
447
|
-
5. Inside the location block,
|
451
|
+
5. Inside the location block, set `passenger_document_root <PATH TO YOUR APPLICATION'S PUBLIC DIRECTORY>`.
|
452
|
+
6. Inside the location block, re-specify `passenger_enabled on`.
|
448
453
|
|
449
454
|
Here is an example:
|
450
455
|
|
@@ -459,9 +464,10 @@ http {
|
|
459
464
|
|
460
465
|
# This block has been added.
|
461
466
|
location ~ ^/subapp(/.*|$) {
|
462
|
-
passenger_base_uri /subapp;
|
463
467
|
alias /websites/wsgi/public$1; # <-- be sure to point to 'public'!
|
468
|
+
passenger_base_uri /subapp;
|
464
469
|
passenger_app_root /websites/wsgi;
|
470
|
+
passenger_document_root /websites/wsgi/public;
|
465
471
|
passenger_enabled on;
|
466
472
|
}
|
467
473
|
}
|
@@ -498,7 +504,7 @@ Please refer to link:https://github.com/phusion/passenger/wiki/Phusion-Passenger
|
|
498
504
|
|
499
505
|
== Deploying a Meteor application
|
500
506
|
|
501
|
-
Please refer to link:
|
507
|
+
Please refer to link:https://github.com/phusion/passenger/wiki/Phusion-Passenger:-Meteor-tutorial[the Meteor tutorial].
|
502
508
|
|
503
509
|
|
504
510
|
== Configuring Phusion Passenger ==
|
@@ -601,8 +607,11 @@ http {
|
|
601
607
|
# If you have a web app deployed in a sub-URI, customize
|
602
608
|
# passenger_ruby/passenger_python inside a `location` block.
|
603
609
|
# The web app under www.bar.com/blog will use JRuby 1.7.1
|
604
|
-
|
605
|
-
|
610
|
+
location ~ ^/blog(/.*|$) {
|
611
|
+
alias /websites/blog/public$1;
|
612
|
+
passenger_base_uri /blog;
|
613
|
+
passenger_app_root /websites/blog;
|
614
|
+
passenger_document_root /websites/blog/public;
|
606
615
|
passenger_enabled on;
|
607
616
|
passenger_ruby /usr/local/rvm/wrappers/jruby-1.7.1/ruby;
|
608
617
|
}
|
@@ -717,6 +726,25 @@ This option may occur in the following places:
|
|
717
726
|
* In a 'location' configuration block.
|
718
727
|
* In an 'if' configuration scope.
|
719
728
|
|
729
|
+
[[PassengerDocumentRoot]]
|
730
|
+
==== passenger_document_root <path>
|
731
|
+
Used in sub-URI deployment scenarios to tell Phusion Passenger where it
|
732
|
+
should look for static files. Please refer to the following sections for
|
733
|
+
more information:
|
734
|
+
|
735
|
+
* <<deploying_rack_to_sub_uri,Deploying Rack to a sub URI>>
|
736
|
+
* <<deploying_wsgi_to_sub_uri,Deploying WSGI to a sub URI>>
|
737
|
+
* <<deploying_rails_to_sub_uri,Deploying Rails 1 and Rails 2 to a sub URI>>
|
738
|
+
|
739
|
+
This option may occur in the following places:
|
740
|
+
|
741
|
+
* In the 'http' configuration block.
|
742
|
+
* In a 'server' configuration block.
|
743
|
+
* In a 'location' configuration block.
|
744
|
+
* In an 'if' configuration scope.
|
745
|
+
|
746
|
+
In each place, it may be specified at most once.
|
747
|
+
|
720
748
|
[[PassengerSpawnMethod]]
|
721
749
|
==== passenger_spawn_method <string>
|
722
750
|
[TIP]
|
@@ -768,8 +796,8 @@ In each place, it may be specified at most once. The default value is 'on'.
|
|
768
796
|
:version: 3.0.0
|
769
797
|
include::users_guide_snippets/enterprise_only.txt[]
|
770
798
|
|
771
|
-
Enables or disables support for rolling restarts. Normally when you
|
772
|
-
restart an application
|
799
|
+
Enables or disables support for rolling restarts through restart.txt. Normally when you
|
800
|
+
restart an application by touching restart.txt, Phusion Passenger would
|
773
801
|
shut down all application processes and spawn a new one. The spawning
|
774
802
|
of a new application process could take a while, and any requests that
|
775
803
|
come in during this time will be blocked until this first application
|
@@ -795,6 +823,8 @@ Rolling restarts have a few caveat however that you should be aware of:
|
|
795
823
|
been restarted. It is for this reason that you should not use rolling
|
796
824
|
restarts in development, only in production.
|
797
825
|
|
826
|
+
Please note that this option is completely unrelated to the `passenger-config restart` command. That command always initiates a blocking restart, unless `--rolling-restart` is given.
|
827
|
+
|
798
828
|
This option may occur in the following places:
|
799
829
|
|
800
830
|
* In the 'http' configuration block.
|
@@ -185,14 +185,14 @@ On other systems, or if you did not install Apache through the system's package
|
|
185
185
|
|
186
186
|
NOTE: This subsection describes how to set environment variables on Nginx itself, not on apps served through Phusion Passenger for Nginx. The environment variables you set here will be passed to all apps, but you cannot customize them on a per-app basis. See also <<env_vars_passenger_apps,Setting environment variables on Phusion Passenger-served apps>>.
|
187
187
|
|
188
|
-
If you installed Nginx through <<install_on_debian_ubuntu,the
|
188
|
+
If you installed Nginx through <<install_on_debian_ubuntu,the Debian or Ubuntu packages>>, then you can define environment variables in `/etc/default/nginx`. This is a shell script so you must use the `export FOO=bar` syntax.
|
189
189
|
|
190
190
|
Otherwise, environment variables are best set through the script which starts Nginx. For example, if you installed Nginx from source and you used
|
191
191
|
ifdef::apache[]
|
192
192
|
the Nginx init script described in the link:http://www.modrails.com/documentation/Users%20guide%20Nginx.html[Phusion Passenger Users Guide, Nginx version],
|
193
193
|
endif::apache[]
|
194
194
|
ifdef::nginx[]
|
195
|
-
<<nginx_init_script,the Nginx init script described earlier in this manual
|
195
|
+
<<nginx_init_script,the Nginx init script described earlier in this manual>>,
|
196
196
|
endif::nginx[]
|
197
197
|
then you should edit that script to define the environment variables. Those init scripts are regular shell scripts, so use the `export FOO=bar` syntax. Just make sure your set your environment variables before the script starts Nginx.
|
198
198
|
|
@@ -651,7 +651,7 @@ NOTE: If you run the installer with `sudo` then environment variables may not be
|
|
651
651
|
On some systems, C/C++ libraries and headers that Phusion Passenger requires may be located in a non-standard directory. You can force the Phusion Passenger build system to look in those locations by injecting compiler and linker flags using the following environment variables:
|
652
652
|
|
653
653
|
`EXTRA_PRE_CFLAGS`::
|
654
|
-
These flags are injected into all C compiler invocations that involve compiling C
|
654
|
+
These flags are injected into all C compiler invocations that involve compiling C source files. This also covers compiler invocations that compile *and* link. The flags are injected at the beginning of the command string, even before `EXTRA_PRE_LDFLAGS`.
|
655
655
|
`EXTRA_CFLAGS`::
|
656
656
|
Similar to `EXTRA_PRE_CFLAGS`, but injected at the end of the command string, before `EXTRA_LDFLAGS`.
|
657
657
|
`EXTRA_PRE_CXXFLAGS`::
|
@@ -659,7 +659,11 @@ On some systems, C/C++ libraries and headers that Phusion Passenger requires may
|
|
659
659
|
`EXTRA_CXXFLAGS`::
|
660
660
|
Similar to `EXTRA_CFLAGS`, but for C++ compiler invocations.
|
661
661
|
`EXTRA_PRE_LDFLAGS`::
|
662
|
-
These flags are injected into all C/C++ compiler invocations that involve linking. This includes compiler invocations that compile *and* link. The flags are injected at the beginning of the command string, but after `EXTRA_PRE_CFLAGS
|
662
|
+
These flags are injected into all C/C++ compiler invocations that involve linking. This includes compiler invocations that compile *and* link. The flags are injected at the beginning of the command string, but after `EXTRA_PRE_CFLAGS`/`EXTRA_PRE_CXXFLAGS`.
|
663
|
+
`EXTRA_PRE_C_LDFLAGS`::
|
664
|
+
These flags are injected into all C compiler invocations that involve linking, right after `EXTRA_PRE_LDFLAGS`.
|
665
|
+
`EXTRA_PRE_CXX_LDFLAGS`::
|
666
|
+
Similar to `EXTRA_PRE_CXX_LDFLAGS`, but for C++ compiler invocations.
|
663
667
|
`EXTRA_LDFLAGS`::
|
664
668
|
Similar to `EXTRA_PRE_LDFLAGS`, but injected at the very end of the command string, even after `EXTRA_CFLAGS` and `EXTRA_CXXFLAGS`.
|
665
669
|
`EXTRA_C_LDFLAGS`::
|
@@ -477,6 +477,10 @@ Hooks may be called concurrently. For example, while the `attached_process` hook
|
|
477
477
|
|
478
478
|
If a hook script fails -- that is, if it exits with anything other than exit code 0 -- then the error handling depends on the hook. Some hooks will abort, other hooks will ignore the error. In all cases, the result of the hook script is printed to the log.
|
479
479
|
|
480
|
+
==== Compatibility
|
481
|
+
|
482
|
+
Because hooks are inherently tied to the implementation of Phusion Passenger, there is no guarantee that hooks that currently work will continue to be available in the future versions of Phusion Passenger. The availability of hooks is very much tied to the specific version of Phusion Passenger.
|
483
|
+
|
480
484
|
==== Available hooks
|
481
485
|
|
482
486
|
`before_watchdog_initialization`::
|
data/ext/apache2/Hooks.cpp
CHANGED
@@ -1218,7 +1218,17 @@ private:
|
|
1218
1218
|
size_t size;
|
1219
1219
|
|
1220
1220
|
size = fread(buf, 1, sizeof(buf), uploadData->handle);
|
1221
|
-
|
1221
|
+
try {
|
1222
|
+
writeExact(fd, buf, size);
|
1223
|
+
} catch (const SystemException &e) {
|
1224
|
+
if (e.code() == EPIPE || e.code() == ECONNRESET) {
|
1225
|
+
// The HelperAgent stopped reading the body, probably
|
1226
|
+
// because the application already sent EOF.
|
1227
|
+
return;
|
1228
|
+
} else {
|
1229
|
+
throw e;
|
1230
|
+
}
|
1231
|
+
}
|
1222
1232
|
}
|
1223
1233
|
}
|
1224
1234
|
|
@@ -1592,6 +1602,7 @@ init_module(apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *ptemp, server_rec *
|
|
1592
1602
|
} catch (const thread_resource_error &e) {
|
1593
1603
|
struct rlimit lim;
|
1594
1604
|
string pthread_threads_max;
|
1605
|
+
int ret;
|
1595
1606
|
|
1596
1607
|
lim.rlim_cur = 0;
|
1597
1608
|
lim.rlim_max = 0;
|
@@ -1625,11 +1636,13 @@ init_module(apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *ptemp, server_rec *
|
|
1625
1636
|
|
1626
1637
|
fprintf(stderr, "Output of 'uname -a' follows:\n");
|
1627
1638
|
fflush(stderr);
|
1628
|
-
::system("uname -a >&2");
|
1639
|
+
ret = ::system("uname -a >&2");
|
1640
|
+
(void) ret; // Ignore compiler warning.
|
1629
1641
|
|
1630
1642
|
fprintf(stderr, "\nOutput of 'ulimit -a' follows:\n");
|
1631
1643
|
fflush(stderr);
|
1632
|
-
::system("ulimit -a >&2");
|
1644
|
+
ret = ::system("ulimit -a >&2");
|
1645
|
+
(void) ret; // Ignore compiler warning.
|
1633
1646
|
|
1634
1647
|
return DECLINED;
|
1635
1648
|
|