passenger 4.0.24 → 4.0.25

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.

Files changed (37) hide show
  1. data.tar.gz.asc +7 -7
  2. data/INSTALL.md +2 -2
  3. data/NEWS +12 -0
  4. data/README.md +14 -6
  5. data/build/packaging.rb +3 -1
  6. data/doc/Users guide Apache.idmap.txt +19 -17
  7. data/doc/Users guide Apache.txt +146 -95
  8. data/doc/Users guide Nginx.txt +6 -6
  9. data/doc/Users guide Standalone.idmap.txt +19 -15
  10. data/doc/Users guide Standalone.txt +26 -1
  11. data/doc/Users guide.txt +9 -0
  12. data/doc/images/passenger_nodejs_architecture.svg +558 -0
  13. data/doc/users_guide_snippets/installation.txt +19 -16
  14. data/ext/common/AgentsStarter.h +1 -11
  15. data/ext/common/ApplicationPool2/AppTypes.cpp +5 -0
  16. data/ext/common/ApplicationPool2/AppTypes.h +1 -0
  17. data/ext/common/ApplicationPool2/Options.h +8 -4
  18. data/ext/common/ApplicationPool2/Spawner.h +1 -0
  19. data/ext/common/Constants.h +2 -2
  20. data/ext/common/ServerInstanceDir.h +9 -24
  21. data/ext/common/agents/HelperAgent/RequestHandler.h +1 -0
  22. data/ext/nginx/CacheLocationConfig.c +40 -0
  23. data/ext/nginx/ConfigurationCommands.c +30 -0
  24. data/ext/nginx/ConfigurationFields.h +6 -0
  25. data/ext/nginx/ContentHandler.c +40 -32
  26. data/ext/nginx/CreateLocationConfig.c +15 -0
  27. data/ext/nginx/MergeLocationConfig.c +18 -0
  28. data/helper-scripts/node-loader.js +2 -1
  29. data/lib/phusion_passenger.rb +3 -3
  30. data/lib/phusion_passenger/constants.rb +1 -1
  31. data/lib/phusion_passenger/nginx/config_options.rb +13 -0
  32. data/lib/phusion_passenger/standalone/start_command.rb +19 -2
  33. data/lib/phusion_passenger/utils/tmpdir.rb +0 -1
  34. data/resources/templates/standalone/config.erb +8 -1
  35. data/test/integration_tests/native_packaging_spec.rb +14 -4
  36. metadata +3 -2
  37. metadata.gz.asc +7 -7
data.tar.gz.asc CHANGED
@@ -2,11 +2,11 @@
2
2
  Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
3
3
  Comment: GPGTools - http://gpgtools.org
4
4
 
5
- iQEcBAABAgAGBQJShLLBAAoJECrHRaUKISqM1uUH/RdBRvtxskGHHdZszBUNQvXT
6
- SfE8B2oFFPLQwLEv/xLrkT+38lZZmRSFUsTdC5oeddByz8mKEKmD8pTQ2KbqpeEO
7
- isWz9EClNxKdKrLEUiSBP/sHFM6V4uaMbzZ5h85gwrINEidNG+ovBoxLOErraiDV
8
- 0iX26Sc3QpSD9sWrY+ZtrZIs8wWjzRq0cpRh4QtMe19K2fzUe3TBlcsJDY4bcI3L
9
- 4lE/Ufwm+5yh8I5IgvTNkxxmA05FDJN7Jh8h/jwHbKxWX4/CqNADqaKvfO9VqXYd
10
- jffewfennXjyGYJ5K3GvBZ5G5UUOXK+UDTSoRtYrDt3ctP6ylXGOLe5m05JznR0=
11
- =o6KQ
5
+ iQEcBAABAgAGBQJSi8RJAAoJECrHRaUKISqMCSIIAI+VKk4qgW9zhjSUAZ7HsZbT
6
+ jyB8LsJqSdcoenACclHob+RozCcvXFW2BLZp6tx6QrQV2HQ2nolNAFdVBO8SfgOf
7
+ WC4AAeYby/GBCiRZHFN69zCxmp/WAgP/9GAsSAwJDhW/0qDjx36RWE+Z8Elq4wd/
8
+ H31gpnOma9DD5rWSpFxYuqpT7MR6Ino4Bf1QnwpVo6tHpe2PO5wHA8fSiBwG+uyX
9
+ VnCKWkpjqadczpdqHI//AftXo7LtLmDGFY/jA7LtISk4WPuH3PHAhXnblAxvFV4+
10
+ bhZGqZionb1bq/OcWeB68Pa2IalxLLkZzi3NR08jnfjJuUuspQpvSQ5VQh78DCc=
11
+ =aoKj
12
12
  -----END PGP SIGNATURE-----
data/INSTALL.md CHANGED
@@ -2,6 +2,6 @@
2
2
 
3
3
  Please read README.md for installation instructions.
4
4
 
5
- If you're having trouble installing Phusion Passenger, please read the file `doc/Users guide Apache.html` or `doc/Users guide Nginx.html`, depending on whether you want to install Phusion Passenger for Apache or for Nginx.
5
+ If you're having trouble installing Phusion Passenger, please refer to [the manual](http://www.modrails.com/documentation/Users%20guide.html).
6
6
 
7
- Documentation and support resources are also available on [the website](https://www.phusionpassenger.com/support).
7
+ Documentation and support resources are also available on [the website](https://www.phusionpassenger.com/documentation_and_support).
data/NEWS CHANGED
@@ -1,3 +1,15 @@
1
+ Release 4.0.25
2
+ --------------
3
+
4
+ * The `PassengerEnv`/`passenger_env`/`--environment` option now also sets NODE_ENV,
5
+ so that Node.js frameworks like Connect can properly respond to the environment.
6
+ * Fixed a bug in our Debian/Ubuntu packages causing `passenger-install-nginx-module`
7
+ not to be able to compile Nginx.
8
+ * Arbitrary Node.js application structures are now supported.
9
+ * [Nginx] Introduced the `passenger_restart_dir` option.
10
+ * [Nginx] Upgraded preferred Nginx version to 1.4.4 because of CVE-2013-4547.
11
+
12
+
1
13
  Release 4.0.24
2
14
  --------------
3
15
 
data/README.md CHANGED
@@ -1,10 +1,20 @@
1
1
  # Phusion Passenger: a fast and robust web server and application server for Ruby, Python and Node.js
2
2
 
3
- [Phusion Passenger](https://www.phusionpassenger.com/) is a web server and application server, designed to be fast, robust and lightweight. It runs your web apps with the least amount of hassle by taking care of almost all administrative heavy lifting for you. Advanced administration tools allow you to gain deep insight into your web applications' operations and to keep your servers healthy. Phusion Passenger is polyglot by design, and currently supports Ruby (Rack), Python (WSGI) and Node.js.
3
+ [Phusion Passenger](https://www.phusionpassenger.com/) is a web server and application server, designed to be fast, robust and lightweight. It takes a lot of complexity out of deploying web apps, adds powerful enterprise-grade features that are useful in production, and makes administration much easier and less complex. Phusion Passenger supports Ruby, Python, Node.js and Meteor, and is being used by high-profile companies such as **Apple, Pixar, New York Times, AirBnB, Juniper** etc as well as [over 350.000 websites](http://trends.builtwith.com/Web-Server/Phusion-Passenger).
4
4
 
5
- ## Regular installation
5
+ What makes it so fast and reliable is its **C++** core, its **zero-copy** architecture, its **watchdog** system and its **hybrid** evented, multi-threaded and multi-process design.
6
6
 
7
- You can install either Phusion Passenger for Apache or for Nginx. Basically, installation involves running one of these commands:
7
+ **Learn more:** [Website](https://www.phusionpassenger.com/) | [Documentation](https://www.phusionpassenger.com/documentation_and_support) | [Support resources](https://www.phusionpassenger.com/documentation_and_support) | [Github](https://github.com/phusion/passenger) | [Twitter](https://twitter.com/phusion_nl) | [Blog](http://blog.phusion.nl/)
8
+
9
+ <center><img src="http://blog.phusion.nl/wp-content/uploads/2012/07/Passenger_chair_256x256.jpg" width="160" height="160" alt="Phusion Passenger"></center>
10
+
11
+ ## Installation
12
+
13
+ Please follow [the installation instructions on the website](https://www.phusionpassenger.com/download).
14
+
15
+ ### Installing the source directly from git
16
+
17
+ If you mean to install the latest version of Passenger directly from this git repository, then you should run one of the following commands. Installing from the git repository is basically the same as the tarball installation method, as [described in the manual](http://modrails.com/documentation/Users%20guide.html#installation).
8
18
 
9
19
  ./bin/passenger-install-apache2-module
10
20
 
@@ -17,11 +27,9 @@ You can install either Phusion Passenger for Apache or for Nginx. Basically, ins
17
27
  # From your application directory
18
28
  ~/path-to-passenger/bin/passenger start
19
29
 
20
- That's it. :) However on some systems installation may require some more steps. You may have to run `sudo` or `rvmsudo`, and you may have to relax permissions on some directories, etc. Detailed fool-proof installation instructions can be found in [the documentation](http://www.modrails.com/documentation/Users%20guide.html).
21
-
22
30
  For troubleshooting, configuration and tips, please also refer to the above documentation. For further support, please refer to [the Phusion Passenger support page](https://www.phusionpassenger.com/support).
23
31
 
24
- ## Installing as a gem
32
+ Ruby users can also build a gem from the Git repository and install the gem.
25
33
 
26
34
  gem build passenger.gemspec
27
35
  gem install passenger-x.x.x.gem
@@ -388,7 +388,9 @@ task :fakeroot => [:apache2, :nginx, :doc] do
388
388
  # Headers necessary for building the Nginx module
389
389
  sh "mkdir -p #{fake_include_dir}"
390
390
  # Infer headers that the Nginx module needs
391
- headers = []
391
+ headers = [
392
+ ["ext/common/Exceptions.h", "Exceptions.h"]
393
+ ]
392
394
  Dir["ext/nginx/*.[ch]"].each do |filename|
393
395
  File.read(filename).split("\n").grep(%r{#include "common/(.+)"}) do |match|
394
396
  headers << ["ext/common/#{$1}", $1]
@@ -114,7 +114,9 @@
114
114
 
115
115
  5.2. Deploying to a virtual host’s root => deploying-to-a-virtual-host-s-root-zzo4v7
116
116
 
117
- 5.3. Redeploying (restarting the WSGI application) => redeploying-restarting-the-wsgi-application--na7pmf
117
+ 5.3. Deploying to a sub URI => deploying-to-a-sub-uri-ayqz96
118
+
119
+ 5.4. Redeploying (restarting the WSGI application) => redeploying-restarting-the-wsgi-application--na7pmf
118
120
 
119
121
  6. Configuring Phusion Passenger => configuring-phusion-passenger-11oztoe
120
122
 
@@ -134,11 +136,13 @@
134
136
 
135
137
  6.3.5. PassengerAppRoot <path/to/root> => passengerapproot-path-to-root--uf24yd
136
138
 
137
- 6.3.6. PassengerRestartDir <directory> => passengerrestartdir-directory--1fmhmv0
139
+ 6.3.6. PassengerBaseURI <uri> => passengerbaseuri-uri--97i9mm
140
+
141
+ 6.3.7. PassengerRestartDir <directory> => passengerrestartdir-directory--1fmhmv0
138
142
 
139
- 6.3.7. PassengerRollingRestarts <on|off> => passengerrollingrestarts
143
+ 6.3.8. PassengerRollingRestarts <on|off> => passengerrollingrestarts
140
144
 
141
- 6.3.8. PassengerResistDeploymentErrors <on|off> => passengerresistdeploymenterrors
145
+ 6.3.9. PassengerResistDeploymentErrors <on|off> => passengerresistdeploymenterrors
142
146
 
143
147
  6.4. Process spawning options => process-spawning-options-v2vscm
144
148
 
@@ -216,15 +220,11 @@
216
220
 
217
221
  6.10. Rack and Rails >= 3 specific options => rack-specific-options-wk9qzt
218
222
 
219
- 6.10.1. RackBaseURI <uri> => rackbaseuri-uri--1to24pj
220
-
221
- 6.10.2. RackEnv <string> => rackenv-string--vve9py
223
+ 6.10.1. RackEnv <string> => rackenv-string--vve9py
222
224
 
223
225
  6.11. Classic Ruby on Rails (⇐ 2.x)-specific options => ruby-on-rails-specific-options-1t10wfu
224
226
 
225
- 6.11.1. RailsBaseURI <uri> => railsbaseuri-uri--1txrw3k
226
-
227
- 6.11.2. RailsEnv <string> => railsenv-string--1b0xxvu
227
+ 6.11.1. RailsEnv <string> => railsenv-string--1b0xxvu
228
228
 
229
229
  6.12. Advanced options => advanced-options-1ab1jkq
230
230
 
@@ -236,19 +236,21 @@
236
236
 
237
237
  6.13.1. RailsRuby => railsruby-ht09ei
238
238
 
239
- 6.13.2. RailsUserSwitching => railsuserswitching-1npx8y4
239
+ 6.13.2. RailsBaseURI and RackBaseURI => railsbaseuri-uri--1txrw3k
240
+
241
+ 6.13.3. RailsUserSwitching => railsuserswitching-1npx8y4
240
242
 
241
- 6.13.3. RailsDefaultUser => railsdefaultuser-19j7n3m
243
+ 6.13.4. RailsDefaultUser => railsdefaultuser-19j7n3m
242
244
 
243
- 6.13.4. RailsAllowModRewrite => railsallowmodrewrite-1vkziro
245
+ 6.13.5. RailsAllowModRewrite => railsallowmodrewrite-1vkziro
244
246
 
245
- 6.13.5. RailsSpawnMethod => railsspawnmethod-1aljgpa
247
+ 6.13.6. RailsSpawnMethod => railsspawnmethod-1aljgpa
246
248
 
247
- 6.13.6. RailsAutoDetect, RackAutoDetect and WsgiAutoDetect => railsautodetect-rackautodetect-and-wsgiautodetect-1qgakzs
249
+ 6.13.7. RailsAutoDetect, RackAutoDetect and WsgiAutoDetect => railsautodetect-rackautodetect-and-wsgiautodetect-1qgakzs
248
250
 
249
- 6.13.7. RailsAppSpawnerIdleTime => railsappspawneridletime-heh41r
251
+ 6.13.8. RailsAppSpawnerIdleTime => railsappspawneridletime-heh41r
250
252
 
251
- 6.13.8. RailsFrameworkSpawnerIdleTime => railsframeworkspawneridletime-adcf9k
253
+ 6.13.9. RailsFrameworkSpawnerIdleTime => railsframeworkspawneridletime-adcf9k
252
254
 
253
255
  7. Troubleshooting => troubleshooting-2ihihi
254
256
 
@@ -86,22 +86,21 @@ Suppose that you already have a virtual host:
86
86
  </VirtualHost>
87
87
  -------------------------------------------
88
88
 
89
- And you want your Ruby on Rails application to be accessible from the URL
90
- 'http://www.phusion.nl/rails'.
89
+ And you want your Rails application, located in `/websites/rails`, to be accessible from the URL
90
+ 'http://www.phusion.nl/subapp'.
91
91
 
92
- To do this, make a symlink in the virtual host's document root, and have it
93
- point to your Ruby on Rails application's 'public' folder. For example:
94
- -------------------------------------------
95
- ln -s /webapps/mycook/public /websites/phusion/rails
96
- -------------------------------------------
92
+ To do this, you need to perform the following:
97
93
 
98
- Next, add a <<RailsBaseURI,RailsBaseURI>> option to the virtual host configuration,
99
- and also make sure that:
94
+ 1. Set `Alias {SUBURI} {PATH TO YOUR APPLICATION'S PUBLIC DIRECTORY}`.
95
+ 2. Create a `<Location /{SUBURI}>` block.
96
+ 3. Inside the Location block, set `PassengerBaseURI /{SUBURI}`.
97
+ 4. Inside the Location block, set `PassengerAppRoot {PATH TO YOUR APPLICATION ROOT}`.
98
+ 5. Create a `<Directory {PATH TO YOUR APPLICATION'S PUBLIC DIRECTORY}>` block.
99
+ 6. Inside the Directory block, set `Allow from all`.
100
+ 7. Inside the Directory block, disable MultiViews.
100
101
 
101
- - The Apache per-directory permissions allow access to this folder.
102
- - MultiViews is disabled for this folder.
102
+ Here is an example:
103
103
 
104
- For example:
105
104
  -------------------------------------------
106
105
  <VirtualHost *:80>
107
106
  ServerName www.phusion.nl
@@ -110,13 +109,20 @@ For example:
110
109
  Allow from all
111
110
  </Directory>
112
111
 
113
- RailsBaseURI /rails # <-- These lines have
114
- <Directory /websites/phusion/rails> # <-- been added.
115
- Options -MultiViews # <--
116
- </Directory> # <--
112
+ # These have been added:
113
+ Alias /subapp /websites/rails/public
114
+ <Location /subapp>
115
+ PassengerBaseURI /subapp
116
+ PassengerAppRoot /websites/rails
117
+ </Location>
118
+ <Directory /websites/rails/public>
119
+ Allow from all
120
+ Options -MultiViews
121
+ </Directory>
117
122
  </VirtualHost>
118
123
  -------------------------------------------
119
- Then restart Apache. The application has now been deployed.
124
+
125
+ Then restart Apache. The application has now been deployed to the sub-URI.
120
126
 
121
127
  NOTE: If you're deploying to a sub-URI then please make sure that your view
122
128
  templates correctly handles references to sub-URI static assets! Otherwise
@@ -124,20 +130,6 @@ you may find broken links to images, CSS files, JavaScripts, etc. Please read
124
130
  <<sub_uri_deployment_uri_fix,How to fix broken images/CSS/JavaScript URIs in sub-URI deployments>>
125
131
  for more information.
126
132
 
127
- [TIP]
128
- ======================================
129
- You can deploy multiple Rails applications under a virtual host, by specifying
130
- <<RailsBaseURI,RailsBaseURI>> multiple times. For example:
131
- ---------------------------------
132
- <VirtualHost *:80>
133
- ....
134
- RailsBaseURI /app1
135
- RailsBaseURI /app2
136
- RailsBaseURI /app3
137
- </VirtualHost>
138
- ---------------------------------
139
- ======================================
140
-
141
133
  === Redeploying (restarting the Ruby on Rails application) ===
142
134
 
143
135
  Deploying a new version of a Ruby on Rails application is as simple as
@@ -294,22 +286,21 @@ Suppose that you already have a virtual host:
294
286
  </VirtualHost>
295
287
  -------------------------------------------
296
288
 
297
- And you want your Rack application to be accessible from the URL
298
- 'http://www.phusion.nl/rack'.
289
+ And you want your Rack application, located in `/websites/rack`, to be accessible from the URL
290
+ 'http://www.phusion.nl/subapp'.
299
291
 
300
- To do this, make a symlink in the virtual host's document root, and have it
301
- point to your Rack application's 'public' folder. For example:
302
- -------------------------------------------
303
- ln -s /webapps/rackapp/public /websites/phusion/rack
304
- -------------------------------------------
292
+ To do this, you need to perform the following:
305
293
 
306
- Next, add a <<RackBaseURI,RackBaseURI>> option to the virtual host configuration,
307
- and also make sure that:
294
+ 1. Set `Alias {SUBURI} {PATH TO YOUR APPLICATION'S PUBLIC DIRECTORY}`.
295
+ 2. Create a `<Location /{SUBURI}>` block.
296
+ 3. Inside the Location block, set `PassengerBaseURI /{SUBURI}`.
297
+ 4. Inside the Location block, set `PassengerAppRoot {PATH TO YOUR APPLICATION ROOT}`.
298
+ 5. Create a `<Directory {PATH TO YOUR APPLICATION'S PUBLIC DIRECTORY}>` block.
299
+ 6. Inside the Directory block, set `Allow from all`.
300
+ 7. Inside the Directory block, disable MultiViews.
308
301
 
309
- - The Apache per-directory permissions allow access to this folder.
310
- - MultiViews is disabled for this folder.
302
+ Here is an example:
311
303
 
312
- For example:
313
304
  -------------------------------------------
314
305
  <VirtualHost *:80>
315
306
  ServerName www.phusion.nl
@@ -317,28 +308,21 @@ For example:
317
308
  <Directory /websites/phusion>
318
309
  Allow from all
319
310
  </Directory>
320
-
321
- RackBaseURI /rack # <-- These lines have
322
- <Directory /websites/phusion/rack> # <-- been added.
323
- Options -MultiViews # <--
324
- </Directory> # <--
311
+
312
+ # These have been added:
313
+ Alias /subapp /websites/rack/public
314
+ <Location /subapp>
315
+ PassengerBaseURI /subapp
316
+ PassengerAppRoot /websites/rack
317
+ </Location>
318
+ <Directory /websites/rack/public>
319
+ Allow from all
320
+ Options -MultiViews
321
+ </Directory>
325
322
  </VirtualHost>
326
323
  -------------------------------------------
327
- Then restart Apache. The application has now been deployed.
328
324
 
329
- [TIP]
330
- ======================================
331
- You can deploy multiple Rack applications under a virtual host, by specifying
332
- <<RackBaseURI,RackBaseURI>> multiple times. For example:
333
- ---------------------------------
334
- <VirtualHost *:80>
335
- ....
336
- RackBaseURI /app1
337
- RackBaseURI /app2
338
- RackBaseURI /app3
339
- </VirtualHost>
340
- ---------------------------------
341
- ======================================
325
+ Then restart Apache. The application has now been deployed to the sub-URI.
342
326
 
343
327
  === Redeploying (restarting the Rack application) ===
344
328
 
@@ -451,6 +435,59 @@ following folders are readable and executable by Apache:
451
435
 
452
436
  Then restart Apache. The application has now been deployed.
453
437
 
438
+ [[deploying_python_to_sub_uri]]
439
+ === Deploying to a sub URI ===
440
+
441
+ Suppose that you already have a virtual host:
442
+
443
+ -------------------------------------------
444
+ <VirtualHost *:80>
445
+ ServerName www.phusion.nl
446
+ DocumentRoot /websites/phusion
447
+ <Directory /websites/phusion>
448
+ Allow from all
449
+ </Directory>
450
+ </VirtualHost>
451
+ -------------------------------------------
452
+
453
+ And you want your Python application, located in `/websites/python`, to be accessible from the URL
454
+ 'http://www.phusion.nl/subapp'.
455
+
456
+ To do this, you need to perform the following:
457
+
458
+ 1. Set `Alias {SUBURI} {PATH TO YOUR APPLICATION'S PUBLIC DIRECTORY}`.
459
+ 2. Create a `<Location /{SUBURI}>` block.
460
+ 3. Inside the Location block, set `PassengerBaseURI /{SUBURI}`.
461
+ 4. Inside the Location block, set `PassengerAppRoot {PATH TO YOUR APPLICATION ROOT}`.
462
+ 5. Create a `<Directory {PATH TO YOUR APPLICATION'S PUBLIC DIRECTORY}>` block.
463
+ 6. Inside the Directory block, set `Allow from all`.
464
+ 7. Inside the Directory block, disable MultiViews.
465
+
466
+ Here is an example:
467
+
468
+ -------------------------------------------
469
+ <VirtualHost *:80>
470
+ ServerName www.phusion.nl
471
+ DocumentRoot /websites/phusion
472
+ <Directory /websites/phusion>
473
+ Allow from all
474
+ </Directory>
475
+
476
+ # These have been added:
477
+ Alias /subapp /websites/python/public
478
+ <Location /subapp>
479
+ PassengerBaseURI /subapp
480
+ PassengerAppRoot /websites/python
481
+ </Location>
482
+ <Directory /websites/python/public>
483
+ Allow from all
484
+ Options -MultiViews
485
+ </Directory>
486
+ </VirtualHost>
487
+ -------------------------------------------
488
+
489
+ Then restart Apache. The application has now been deployed to the sub-URI.
490
+
454
491
  === Redeploying (restarting the WSGI application) ===
455
492
 
456
493
  Deploying a new version of a WSGI application is as simple as
@@ -575,10 +612,17 @@ PassengerNodejs /usr/bin/node;
575
612
  # If you have a web app deployed in a sub-URI, customize
576
613
  # PassengerRuby/PassengerPython inside a <Location> block.
577
614
  # The web app under www.bar.com/blog will use JRuby 1.7.1
578
- RackBaseURI /blog
615
+ Alias /blog /websites/blog/public
579
616
  <Location /blog>
617
+ PassengerBaseURI /blog
618
+ PassengerAppRoot /websites/blog
619
+
580
620
  PassengerRuby /usr/local/rvm/wrappers/jruby-1.7.1/ruby
581
621
  </Location>
622
+ <Directory /websites/blog/public>
623
+ Allow from all
624
+ Options -MultiViews
625
+ </Directory>
582
626
  </VirtualHost>
583
627
 
584
628
  <VirtualHost *:80>
@@ -630,6 +674,22 @@ Example:
630
674
  </VirtualHost>
631
675
  -----------------------------
632
676
 
677
+ [[PassengerBaseURI]]
678
+ ==== PassengerBaseURI <uri> ====
679
+ Used to specify that the given URI is a Phusion Passenger-served application. Please refer
680
+ to the following sections for examples:
681
+
682
+ * <<deploying_rails_to_sub_uri,Deploying Rails 1.x and 2.x to a sub URI>>
683
+ * <<deploying_rack_to_sub_uri,Deploying Rack (including Rails >= 3) to a sub URI>>
684
+ * <<deploying_python_to_sub_uri,Deploying Python to a sub URI>>
685
+
686
+ This option may occur in the following places:
687
+
688
+ * In the global server configuration.
689
+ * In a virtual host configuration block.
690
+ * In a `<Directory>` or `<Location>` block.
691
+ * In '.htaccess', if `AllowOverride Options` is on.
692
+
633
693
  ==== PassengerRestartDir <directory>
634
694
  As described in the deployment chapters of this document, Phusion Passenger
635
695
  checks the file 'tmp/restart.txt' in the applications'
@@ -1358,7 +1418,16 @@ Suppose that you have a web application deployed in a sub-URI '/store', like thi
1358
1418
  <VirtualHost *:80>
1359
1419
  ServerName myblog.com
1360
1420
  DocumentRoot /webapps/wordpress
1361
- RailsBaseURI /store
1421
+
1422
+ Alias /store /websites/store/public
1423
+ <Location /store>
1424
+ PassengerBaseURI /store
1425
+ PassengerAppRoot /websites/store
1426
+ </Location>
1427
+ <Directory /websites/store/public>
1428
+ Allow from all
1429
+ Options -MultiViews
1430
+ </Directory>
1362
1431
  </VirtualHost>
1363
1432
  ---------------------------
1364
1433
 
@@ -1369,7 +1438,16 @@ like this:
1369
1438
  <VirtualHost *:80>
1370
1439
  ServerName myblog.com
1371
1440
  DocumentRoot /webapps/wordpress
1372
- RailsBaseURI /store
1441
+
1442
+ Alias /store /websites/store/public
1443
+ <Location /store>
1444
+ PassengerBaseURI /store
1445
+ PassengerAppRoot /websites/store
1446
+ </Location>
1447
+ <Directory /websites/store/public>
1448
+ Allow from all
1449
+ Options -MultiViews
1450
+ </Directory>
1373
1451
  </VirtualHost>
1374
1452
 
1375
1453
  PassengerPreStart http://myblog.com/store # <----- added
@@ -1809,21 +1887,6 @@ In each place, it may be specified at most once. The default value is 'off'.
1809
1887
 
1810
1888
  === Rack and Rails >= 3 specific options ===
1811
1889
 
1812
- [[RackBaseURI]]
1813
- ==== RackBaseURI <uri> ====
1814
- Used to specify that the given URI is a Rack application. See
1815
- <<deploying_rack_to_sub_uri,Deploying Rack to a sub URI>> for an example.
1816
-
1817
- It is allowed to specify this option multiple times. Do this to deploy multiple
1818
- Rack applications in different sub-URIs under the same virtual host.
1819
-
1820
- This option may occur in the following places:
1821
-
1822
- * In the global server configuration.
1823
- * In a virtual host configuration block.
1824
- * In a `<Directory>` or `<Location>` block.
1825
- * In '.htaccess', if `AllowOverride Options` is on.
1826
-
1827
1890
  [[rack_env]]
1828
1891
  ==== RackEnv <string> ====
1829
1892
  The given value will be accessible in Rack applications in the `RACK_ENV`
@@ -1844,21 +1907,6 @@ In each place, it may be specified at most once. The default value is 'productio
1844
1907
  These options only have effect on classic Ruby on Rails 1.x and 2.x applications.
1845
1908
  Ruby on Rails >= 3.x applications are considered Rack applications.
1846
1909
 
1847
- [[RailsBaseURI]]
1848
- ==== RailsBaseURI <uri> ====
1849
- Used to specify that the given URI is a Rails application. See
1850
- <<deploying_rails_to_sub_uri,Deploying Rails to a sub URI>> for an example.
1851
-
1852
- It is allowed to specify this option multiple times. Do this to deploy multiple
1853
- Rails applications in different sub-URIs under the same virtual host.
1854
-
1855
- This option may occur in the following places:
1856
-
1857
- * In the global server configuration.
1858
- * In a virtual host configuration block.
1859
- * In a `<Directory>` or `<Location>` block.
1860
- * In '.htaccess', if `AllowOverride Options` is on.
1861
-
1862
1910
  [[rails_env]]
1863
1911
  ==== RailsEnv <string> ====
1864
1912
  This option allows one to specify the default `RAILS_ENV` value.
@@ -1942,6 +1990,9 @@ compatibility reasons.
1942
1990
  ==== RailsRuby ====
1943
1991
  Deprecated in favor of <<PassengerRuby,PassengerRuby>>.
1944
1992
 
1993
+ ==== RailsBaseURI and RackBaseURI ====
1994
+ Deprecated in favor of <<PassengerBaseURI,PassengerBaseURI>>.
1995
+
1945
1996
  ==== RailsUserSwitching ====
1946
1997
  Deprecated in favor of <<PassengerUserSwitching,PassengerUserSwitching>>.
1947
1998