You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Apache is a custom build available through [apisnetworks/httpd-apache](https://github.com/apisnetworks/httpd-apache). Nonportable atomics are enabled as well as mod_systemd backported from Apache 2.5 development to facilitate lightweight service reports. Latest APR and APR Utility releases are bundled to maximize efficiency. Compilation targets x86-64 machines using default compile flags.
@@ -329,5 +330,5 @@ To bypass this message, add at least 1 hostname to the map file. This can be acc
329
330
330
331
For supporting documentation, see also
331
332
-[PHP-FPM](PHP-FPM.md) - PHP
332
-
-[Passenger](Passenger.md) - Node, Ruby, Python, and Go
333
+
-[Passenger](webapps/Passenger.md) - Node, Ruby, Python, and Go
Copy file name to clipboardExpand all lines: docs/admin/Migrations - cPanel.md
+34-3Lines changed: 34 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -149,7 +149,38 @@ Following migration, ApisCP will attempt to request SSL for each hostname as wel
149
149
150
150
`--unsafe-sources`allows importing unchecked, potentially hazardous, backup data including SquirrelMail preference files and Roundcube MySQL directives. The consistency and validity of this data is not checked. **Do not enable this option unless you are confident the backup has not been tampered with**.
151
151
152
-
### Quota disagreements
152
+
### Reapplying components
153
+
**New in 3.2.32**
154
+
155
+
`--list-components`enumerates all available components for a given backup. These components are determined by files present within the backup. `--do=COMPONENT` may be specified multiple times to reapply *only* those migration components.
In the above example, `--no-create --no-bootstrap --no-scan` are present. `--no-create` is to prevent account creation which is attempted automatically to ensure importing into a pristine environment. Likewise `--no-bootstrap` and `--no-scan` prevent end-of-import hooks from running, SSL acquisition and Web App updates.
180
+
181
+
### Troubleshooting
182
+
183
+
#### Quota disagreements
153
184
154
185
Quotas are accounted and enforced by the kernel. When migrating from certain hosting platforms that employ quasi-quota accounting by software, such as cPanel, the reported quota for a user may be significantly more than what was previously reported. `--late-quota` will apply storage amnesty, which is a 2x storage boost for 12 hours. **Late quota is only triggered** after account creation. Thus when combined with `--no-create`, `--late-quota` has no effect. Call `site:storage-amnesty` against the account using [cpcmd](CLI.md#cpcmd).
These changes will be reflected on future imports.
164
195
165
-
### Decompression oddities
196
+
#### Decompression oddities
166
197
167
198
Migration will attempt to use PHP's PharData handler to decompress files. It's based on USTAR, which has [limitations](https://www.gnu.org/software/tar/manual/html_node/Formats.html#Formats) that may result in a cPanel backup generated in POSIX.1-2001 standards to fail. Use `--no-builtin` to disable the builtin handler from attempting to read the backup.
168
199
169
-
### Empty MySQL credentials
200
+
#### Empty MySQL credentials
170
201
171
202
Prior to MySQL 5.7.5 released in [2014](https://dev.mysql.com/doc/relnotes/mysql/5.7/en/news-5-7-5.html), MySQL accepted passwords created in an insecure hash format that was used prior to 4.1. From speculation, accounts that were created prior to this change were abandoned from a [secure upgrade pathway by cPanel](https://forums.cpanel.net/threads/mysql-upgrade-to-v-5-6-old-style-passwords-cpanel-explanation.649945/).
On the source server, mydomain.com may continue to use DigitalOcean as its [DNS provider](https://bitbucket.org/apisnetworks/apnscp/src/master/lib/Module/Provider/Dns/Digitalocean.php?at=master&fileviewer=file-view-default) while the on the target server mydomain.com will use Linode's [DNS provider](https://bitbucket.org/apisnetworks/apnscp/src/master/lib/Module/Provider/Dns/Linode.php?at=master&fileviewer=file-view-default). Once mydomain.com completes its initial stage (stage 0), be sure to update the nameservers for mydomain.com.
88
88
89
+
## Notification templates
90
+
91
+
A notification is sent at the end **stage 0** (warmup migration) and **stage 1** (final migration). Migrations are read from `resources/templates/migrations/` and may be overrode following [view/template](Customizing.md#ApisCP) override rules.
92
+
93
+
Custom templates may be specified using `--template=`. A single argument or CLI
94
+
89
95
## Skipping suspension
96
+
90
97
An account after migration completes is automatically suspended on the source side. In normal operation, this poses no significant complications as DNS TTL is reduced to 2 minutes or less during stage one migration.
91
98
92
99
`--no-suspend` disables suspension following a successful migration.
Copy file name to clipboardExpand all lines: docs/admin/webapps/Passenger.md
+77Lines changed: 77 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -69,6 +69,83 @@ Global idle shutdown may be modified by overriding `PassengerPoolIdleTime` in `/
69
69
PassengerPoolIdleTime 0
70
70
```
71
71
72
+
## Direct proxy
73
+
74
+
An application may wire in additional services that make automatic startup/shutdown by Passenger cumbersome, such as [Discourse](Discourse.md). A Passenger-based application can be manually started, then connected to using [mod_rewrite](https://httpd.apache.org/docs/2.4/mod/mod_rewrite.html).
75
+
76
+
If an application is running on port 8082, then the following rules in the *document root* of the subdomain or domain will suffice:
77
+
78
+
```
79
+
DirectoryIndex disabled
80
+
RequestHeader set X-Forwarded-Proto expr=%{REQUEST_SCHEME}
81
+
82
+
RewriteEngine On
83
+
# This may be removed to send ALL requests to the app
First, no [directory index](https://httpd.apache.org/docs/2.4/mod/mod_dir.html#directoryindex) will be assumed (index.html, index.php) for the location.
94
+
95
+
The request scheme (http, https) is passed to the proxy as X-Forwarded-Proto. This standard, recognized in [RFC 7239](https://datatracker.ietf.org/doc/html/rfc7239), informs the application if the request was made securely.
96
+
97
+
If the request matches a file in the document root, such as media or JavaScript, then that file is served directly.
98
+
99
+
If the client solicits a request to upgrade to WebSockets, then the ws protocol is used.
100
+
101
+
Otherwise the request is sent locally, unencrypted, to the application listening on port 8082.
102
+
103
+
### Standalone mode
104
+
105
+
Passenger includes a [standalone mode](https://www.phusionpassenger.com/library/config/standalone/intro.html) that facilitates launching an application directly, such as in the case of [Discourse](Discourse.md). Standalone mode is controlled using `Passengerfile.json` typically located in the *application root* for the app.
106
+
107
+
Use of this requires the `passenger` gem in [Ruby](Ruby.md).
108
+
109
+
```bash
110
+
gem install passenger
111
+
```
112
+
113
+
The following annotated configuration illustrates how it comes together. The *document root* is /var/www/forums/public while the *application root* is /var/www/forums.
114
+
115
+
See "[Configuration reference](https://www.phusionpassenger.com/library/config/standalone/reference/)" for a comprehensive listing of directives.
116
+
117
+
```json
118
+
{
119
+
/* Use rbenv shim loader, allows .ruby-version per-directory */
120
+
"ruby": "/usr/local/share/ruby/rbenv/shims/ruby",
121
+
/* can be node, wsgi, rack, or meteor */
122
+
"app_type": "rack",
123
+
"startup_file": "/var/www/forums/config.ru",
124
+
"environment": "production",
125
+
// Use Rack, bundled with Discourse as the HTTP server
126
+
"engine": "builtin",
127
+
// Statically set 6 workers at all times.
128
+
"min_instances": 6,
129
+
"max_pool_size": 6,
130
+
"daemonize": true,
131
+
"spawn_method": "smart",
132
+
// Listen on 127.0.0.1:40011
133
+
"address": "127.0.0.1",
134
+
"port": 40011,
135
+
// Necessary for reliable WebSocket operation in Ruby
136
+
"force_max_concurrent_requests_per_process": 0,
137
+
// Additional env variables to pass to Ruby at startup
138
+
"envvars": {
139
+
"RUBY_GC_HEAP_GROWTH_MAX_SLOTS": "40000",
140
+
"RUBY_GC_HEAP_INIT_SLOTS": "400000",
141
+
"RUBY_GC_HEAP_OLDOBJECT_LIMIT_FACTOR": "1.5",
142
+
"LD_PRELOAD": "/usr/lib64/libjemalloc.so.1"
143
+
}
144
+
}
145
+
```
146
+
147
+
Once configured it may be started using `passenger start` and stopped using `passenger stop`.
148
+
72
149
### See also
73
150
74
151
*[Configuration reference for Passenger + Apache](https://www.phusionpassenger.com/library/config/apache/reference) (phusionpassenger.com)
0 commit comments