We got nominated! Help us out and vote for GitHub as Best Bootstrapped Startup of 2008. (You can vote once a day.) [ hide ]

public
Description: Phusion Passenger (mod_rails)
Homepage: http://www.modrails.com/
Clone URL: git://github.com/FooBarWidget/passenger.git
Click here to lend your support to: passenger and make a donation at www.pledgie.com !
Hongli Lai (Phusion) (author)
Wed May 07 11:27:40 -0700 2008
passenger / ext / apache2 / Configuration.h
bd6e3b45 » Hongli Lai (Phusion) 2008-04-03 Insert GPL headers to sourc... 1 /*
2 * Phusion Passenger - http://www.modrails.com/
3 * Copyright (C) 2008 Phusion
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; version 2 of the License.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License along
15 * with this program; if not, write to the Free Software Foundation, Inc.,
16 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17 */
348e8f97 » Hongli Lai (Phusion) 2008-01-31 mod_rails is more usable no... 18 #ifndef _PASSENGER_CONFIGURATION_H_
19 #define _PASSENGER_CONFIGURATION_H_
20
21 #include <apr_pools.h>
22 #include <httpd.h>
23 #include <http_config.h>
24
e92c4f29 » Hongli Lai (Phusion) 2008-02-06 Improve documentation 25 /**
26 * @defgroup Configuration Apache module configuration
27 * @ingroup Core
28 * @{
29 */
30
31 /** Module version number. */
d08249a5 » Hongli Lai (Phusion) 2008-05-07 Bump version to 1.0.5 32 #define PASSENGER_VERSION "1.0.5"
fc309c41 » Hongli Lai (Phusion) 2008-02-06 Improve API docs. 33
348e8f97 » Hongli Lai (Phusion) 2008-01-31 mod_rails is more usable no... 34 #ifdef __cplusplus
14e19dc3 » Hongli Lai (Phusion) 2008-02-07 Begin implementing support ... 35 #include <set>
36 #include <string>
37
fc1c32fc » Hongli Lai (Phusion) 2008-02-07 Add support for multiple ba... 38 namespace Passenger {
39
40 using namespace std;
41
42 /**
757debda » Hongli Lai (Phusion) 2008-03-12 - Implemented configuration... 43 * Per-directory configuration information.
44 */
fc1c32fc » Hongli Lai (Phusion) 2008-02-07 Add support for multiple ba... 45 struct DirConfig {
34a92665 » Hongli Lai (Phusion) 2008-04-01 Add a 'RailsAllowModRewrite... 46 enum Threeway { ENABLED, DISABLED, UNSET };
47
fc1c32fc » Hongli Lai (Phusion) 2008-02-07 Add support for multiple ba... 48 std::set<std::string> base_uris;
34a92665 » Hongli Lai (Phusion) 2008-04-01 Add a 'RailsAllowModRewrite... 49 Threeway autoDetect;
50 Threeway allowModRewrite;
fc1c32fc » Hongli Lai (Phusion) 2008-02-07 Add support for multiple ba... 51 };
14e19dc3 » Hongli Lai (Phusion) 2008-02-07 Begin implementing support ... 52
757debda » Hongli Lai (Phusion) 2008-03-12 - Implemented configuration... 53 /**
54 * Server-wide configuration information.
55 */
fc1c32fc » Hongli Lai (Phusion) 2008-02-07 Add support for multiple ba... 56 struct ServerConfig {
757debda » Hongli Lai (Phusion) 2008-03-12 - Implemented configuration... 57 /** The filename of the Ruby interpreter to use. */
fc1c32fc » Hongli Lai (Phusion) 2008-02-07 Add support for multiple ba... 58 const char *ruby;
59
757debda » Hongli Lai (Phusion) 2008-03-12 - Implemented configuration... 60 /** The environment (i.e. value for RAILS_ENV) under which the
61 * Rails application should operate. */
fc1c32fc » Hongli Lai (Phusion) 2008-02-07 Add support for multiple ba... 62 const char *env;
b4ad4933 » Hongli Lai (Phusion) 2008-02-07 - Correctly honor server-wi... 63
757debda » Hongli Lai (Phusion) 2008-03-12 - Implemented configuration... 64 /** The filename of the spawn server to use. */
b4ad4933 » Hongli Lai (Phusion) 2008-02-07 - Correctly honor server-wi... 65 const char *spawnServer;
757debda » Hongli Lai (Phusion) 2008-03-12 - Implemented configuration... 66
67 /** The maximum number of simultaneously alive Rails application
68 * instances. */
69 unsigned int maxPoolSize;
70
71 /** Whether the maxPoolSize option was explicitly specified in
72 * this server config. */
73 bool maxPoolSizeSpecified;
74
75 /** The maximum number of seconds that a Rails application may be
76 * idle before it gets terminated. */
77 unsigned int poolIdleTime;
78
79 /** Whether the poolIdleTime option was explicitly specified in
80 * this server config. */
81 bool poolIdleTimeSpecified;
2931e4fe » Hongli Lai (Phusion) 2008-03-22 Instead of using 'nobody' a... 82
c6151cff » Hongli Lai (Phusion) 2008-03-22 Begin implementing user swi... 83 /** Whether user switching support is enabled. */
84 bool userSwitching;
85
86 /** Whether the userSwitching option was explicitly specified in
87 * this server config. */
88 bool userSwitchingSpecified;
f088e983 » Hongli Lai (Phusion) 2008-03-22 Merge branch 'master' into ... 89
829dad7a » Hongli Lai (Phusion) 2008-03-22 Apparently Apache 2.0.55 do... 90 /** User that Rails applications must run as if user switching
91 * fails or is disabled. NULL means the option is not specified.
92 */
93 const char *defaultUser;
fc1c32fc » Hongli Lai (Phusion) 2008-02-07 Add support for multiple ba... 94 };
95 }
14e19dc3 » Hongli Lai (Phusion) 2008-02-07 Begin implementing support ... 96
97 extern "C" {
348e8f97 » Hongli Lai (Phusion) 2008-01-31 mod_rails is more usable no... 98 #endif
99
14e19dc3 » Hongli Lai (Phusion) 2008-02-07 Begin implementing support ... 100 /** Configuration hook for per-directory configuration structure creation. */
101 void *passenger_config_create_dir(apr_pool_t *p, char *dirspec);
102
103 /** Configuration hook for per-directory configuration structure merging. */
104 void *passenger_config_merge_dir(apr_pool_t *p, void *basev, void *addv);
105
106 /** Configuration hook for per-server configuration structure creation. */
107 void *passenger_config_create_server(apr_pool_t *p, server_rec *s);
e92c4f29 » Hongli Lai (Phusion) 2008-02-06 Improve documentation 108
14e19dc3 » Hongli Lai (Phusion) 2008-02-07 Begin implementing support ... 109 /** Configuration hook for per-server configuration structure merging. */
110 void *passenger_config_merge_server(apr_pool_t *p, void *basev, void *overridesv);
e92c4f29 » Hongli Lai (Phusion) 2008-02-06 Improve documentation 111
b4ad4933 » Hongli Lai (Phusion) 2008-02-07 - Correctly honor server-wi... 112 void passenger_config_merge_all_servers(apr_pool_t *pool, server_rec *main_server);
113
14e19dc3 » Hongli Lai (Phusion) 2008-02-07 Begin implementing support ... 114 /** Apache module commands array. */
115 extern const command_rec passenger_commands[];
348e8f97 » Hongli Lai (Phusion) 2008-01-31 mod_rails is more usable no... 116
117 #ifdef __cplusplus
14e19dc3 » Hongli Lai (Phusion) 2008-02-07 Begin implementing support ... 118 }
348e8f97 » Hongli Lai (Phusion) 2008-01-31 mod_rails is more usable no... 119 #endif
120
e92c4f29 » Hongli Lai (Phusion) 2008-02-06 Improve documentation 121 /**
122 * @}
123 */
124
348e8f97 » Hongli Lai (Phusion) 2008-01-31 mod_rails is more usable no... 125 #endif /* _PASSENGER_CONFIGURATION_H_ */