This repository is private.
All pages are served over SSL and all pushing and pulling is done over SSH.
No one may fork, clone, or view it unless they are added as a member.
Every repository with this icon (
) is private.
Every repository with this icon (
This repository is public.
Anyone may fork, clone, or view it.
Every repository with this icon (
) is public.
Every repository with this icon (
Hongli Lai (Phusion) (author)
Wed May 07 11:27:40 -0700 2008
| bd6e3b45 » | Hongli Lai (Phusion) | 2008-04-03 | 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 | 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 | 25 | /** | |
| 26 | * @defgroup Configuration Apache module configuration | ||||
| 27 | * @ingroup Core | ||||
| 28 | * @{ | ||||
| 29 | */ | ||||
| 30 | |||||
| 31 | /** Module version number. */ | ||||
| d08249a5 » | Hongli Lai (Phusion) | 2008-05-07 | 32 | #define PASSENGER_VERSION "1.0.5" | |
| fc309c41 » | Hongli Lai (Phusion) | 2008-02-06 | 33 | ||
| 348e8f97 » | Hongli Lai (Phusion) | 2008-01-31 | 34 | #ifdef __cplusplus | |
| 14e19dc3 » | Hongli Lai (Phusion) | 2008-02-07 | 35 | #include <set> | |
| 36 | #include <string> | ||||
| 37 | |||||
| fc1c32fc » | Hongli Lai (Phusion) | 2008-02-07 | 38 | namespace Passenger { | |
| 39 | |||||
| 40 | using namespace std; | ||||
| 41 | |||||
| 42 | /** | ||||
| 757debda » | Hongli Lai (Phusion) | 2008-03-12 | 43 | * Per-directory configuration information. | |
| 44 | */ | ||||
| fc1c32fc » | Hongli Lai (Phusion) | 2008-02-07 | 45 | struct DirConfig { | |
| 34a92665 » | Hongli Lai (Phusion) | 2008-04-01 | 46 | enum Threeway { ENABLED, DISABLED, UNSET }; | |
| 47 | |||||
| fc1c32fc » | Hongli Lai (Phusion) | 2008-02-07 | 48 | std::set<std::string> base_uris; | |
| 34a92665 » | Hongli Lai (Phusion) | 2008-04-01 | 49 | Threeway autoDetect; | |
| 50 | Threeway allowModRewrite; | ||||
| fc1c32fc » | Hongli Lai (Phusion) | 2008-02-07 | 51 | }; | |
| 14e19dc3 » | Hongli Lai (Phusion) | 2008-02-07 | 52 | ||
| 757debda » | Hongli Lai (Phusion) | 2008-03-12 | 53 | /** | |
| 54 | * Server-wide configuration information. | ||||
| 55 | */ | ||||
| fc1c32fc » | Hongli Lai (Phusion) | 2008-02-07 | 56 | struct ServerConfig { | |
| 757debda » | Hongli Lai (Phusion) | 2008-03-12 | 57 | /** The filename of the Ruby interpreter to use. */ | |
| fc1c32fc » | Hongli Lai (Phusion) | 2008-02-07 | 58 | const char *ruby; | |
| 59 | |||||
| 757debda » | Hongli Lai (Phusion) | 2008-03-12 | 60 | /** The environment (i.e. value for RAILS_ENV) under which the | |
| 61 | * Rails application should operate. */ | ||||
| fc1c32fc » | Hongli Lai (Phusion) | 2008-02-07 | 62 | const char *env; | |
| b4ad4933 » | Hongli Lai (Phusion) | 2008-02-07 | 63 | ||
| 757debda » | Hongli Lai (Phusion) | 2008-03-12 | 64 | /** The filename of the spawn server to use. */ | |
| b4ad4933 » | Hongli Lai (Phusion) | 2008-02-07 | 65 | const char *spawnServer; | |
| 757debda » | Hongli Lai (Phusion) | 2008-03-12 | 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 | 82 | ||
| c6151cff » | Hongli Lai (Phusion) | 2008-03-22 | 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 | 89 | ||
| 829dad7a » | Hongli Lai (Phusion) | 2008-03-22 | 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 | 94 | }; | |
| 95 | } | ||||
| 14e19dc3 » | Hongli Lai (Phusion) | 2008-02-07 | 96 | ||
| 97 | extern "C" { | ||||
| 348e8f97 » | Hongli Lai (Phusion) | 2008-01-31 | 98 | #endif | |
| 99 | |||||
| 14e19dc3 » | Hongli Lai (Phusion) | 2008-02-07 | 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 | 108 | ||
| 14e19dc3 » | Hongli Lai (Phusion) | 2008-02-07 | 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 | 111 | ||
| b4ad4933 » | Hongli Lai (Phusion) | 2008-02-07 | 112 | void passenger_config_merge_all_servers(apr_pool_t *pool, server_rec *main_server); | |
| 113 | |||||
| 14e19dc3 » | Hongli Lai (Phusion) | 2008-02-07 | 114 | /** Apache module commands array. */ | |
| 115 | extern const command_rec passenger_commands[]; | ||||
| 348e8f97 » | Hongli Lai (Phusion) | 2008-01-31 | 116 | ||
| 117 | #ifdef __cplusplus | ||||
| 14e19dc3 » | Hongli Lai (Phusion) | 2008-02-07 | 118 | } | |
| 348e8f97 » | Hongli Lai (Phusion) | 2008-01-31 | 119 | #endif | |
| 120 | |||||
| e92c4f29 » | Hongli Lai (Phusion) | 2008-02-06 | 121 | /** | |
| 122 | * @} | ||||
| 123 | */ | ||||
| 124 | |||||
| 348e8f97 » | Hongli Lai (Phusion) | 2008-01-31 | 125 | #endif /* _PASSENGER_CONFIGURATION_H_ */ | |






