@lando/php 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.editorconfig +12 -0
- package/.eslintignore +4 -0
- package/.eslintrc.json +31 -0
- package/.gitattributes +11 -0
- package/.lando.yml +14 -0
- package/.node-version +1 -0
- package/.nyc_output/39d8df6b-751b-4e0f-9b9a-f9f68686a0ed.json +1 -0
- package/.nyc_output/baf1169d-949a-4c6f-955a-88b2e3fe7cb4.json +1 -0
- package/.nyc_output/processinfo/39d8df6b-751b-4e0f-9b9a-f9f68686a0ed.json +1 -0
- package/.nyc_output/processinfo/baf1169d-949a-4c6f-955a-88b2e3fe7cb4.json +1 -0
- package/.nyc_output/processinfo/index.json +1 -0
- package/.tool-versions +1 -0
- package/CHANGELOG.md +7 -0
- package/LICENSE.md +674 -0
- package/PRIVACY.md +169 -0
- package/README.md +74 -0
- package/actions-lando-config.yml +14 -0
- package/coverage/base.css +224 -0
- package/coverage/block-navigation.js +87 -0
- package/coverage/favicon.png +0 -0
- package/coverage/index.html +132 -0
- package/coverage/lib/index.html +117 -0
- package/coverage/lib/utils.js.html +266 -0
- package/coverage/prettify.css +1 -0
- package/coverage/prettify.js +2 -0
- package/coverage/services/php/builder.js.html +728 -0
- package/coverage/services/php/index.html +117 -0
- package/coverage/sort-arrow-sprite.png +0 -0
- package/coverage/sorter.js +196 -0
- package/images/5.3-apache/Dockerfile +83 -0
- package/images/5.3-apache/apache2.conf +64 -0
- package/images/5.3-fpm/Dockerfile +80 -0
- package/images/5.3-fpm/docker-php-ext-enable +83 -0
- package/images/5.3-fpm/php-fpm.conf +65 -0
- package/images/5.4-apache/Dockerfile +79 -0
- package/images/5.4-apache/apache2-foreground +17 -0
- package/images/5.4-fpm/Dockerfile +75 -0
- package/images/5.5-apache/Dockerfile +77 -0
- package/images/5.5-fpm/Dockerfile +76 -0
- package/images/5.6-apache/Dockerfile +78 -0
- package/images/5.6-fpm/Dockerfile +79 -0
- package/images/7.0-apache/Dockerfile +78 -0
- package/images/7.0-fpm/Dockerfile +78 -0
- package/images/7.1-apache/Dockerfile +86 -0
- package/images/7.1-fpm/Dockerfile +86 -0
- package/images/7.2-apache/Dockerfile +84 -0
- package/images/7.2-fpm/Dockerfile +84 -0
- package/images/7.3-apache/Dockerfile +84 -0
- package/images/7.3-fpm/Dockerfile +84 -0
- package/images/7.4-apache/Dockerfile +83 -0
- package/images/7.4-fpm/Dockerfile +83 -0
- package/images/8.0-apache/Dockerfile +84 -0
- package/images/8.0-fpm/Dockerfile +84 -0
- package/images/8.1-apache/Dockerfile +86 -0
- package/images/8.1-fpm/Dockerfile +87 -0
- package/index.js +3 -0
- package/lib/utils.js +60 -0
- package/netlify.toml +25 -0
- package/package.json +62 -0
- package/plugin.yml +29 -0
- package/services/php/builder.js +214 -0
- package/services/php/default-ssl.conf +188 -0
- package/services/php/default-ssl.conf.tpl +30 -0
- package/services/php/default.conf +41 -0
- package/services/php/default.conf.tpl +20 -0
- package/services/php/php.ini +46 -0
- package/services/php/zz-lando.conf +3 -0
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
// Modules
|
|
4
|
+
const _ = require('lodash');
|
|
5
|
+
const path = require('path');
|
|
6
|
+
const semver = require('semver');
|
|
7
|
+
const utils = require('./../../lib/utils');
|
|
8
|
+
|
|
9
|
+
/*
|
|
10
|
+
* Helper to get nginx config
|
|
11
|
+
*/
|
|
12
|
+
const nginxConfig = options => ({
|
|
13
|
+
app: options.app,
|
|
14
|
+
config: _.merge({}, {
|
|
15
|
+
vhosts: `${options.confDest}/${options.defaultFiles.vhosts}`,
|
|
16
|
+
}, options.config),
|
|
17
|
+
confDest: path.resolve(options.confDest, '..', 'nginx'),
|
|
18
|
+
info: {managed: true},
|
|
19
|
+
home: options.home,
|
|
20
|
+
name: `${options.name}_nginx`,
|
|
21
|
+
overrides: utils.cloneOverrides(options.overrides),
|
|
22
|
+
project: options.project,
|
|
23
|
+
root: options.root,
|
|
24
|
+
ssl: options.nginxSsl,
|
|
25
|
+
type: 'nginx',
|
|
26
|
+
userConfRoot: options.userConfRoot,
|
|
27
|
+
webroot: options.webroot,
|
|
28
|
+
version: options.via.split(':')[1],
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
const xdebugConfig = host => ([
|
|
32
|
+
`client_host=${host}`,
|
|
33
|
+
'discover_client_host=1',
|
|
34
|
+
'log=/tmp/xdebug.log',
|
|
35
|
+
'remote_enable=true',
|
|
36
|
+
`remote_host=${host}`,
|
|
37
|
+
].join(' '));
|
|
38
|
+
|
|
39
|
+
/*
|
|
40
|
+
* Helper to build a package string
|
|
41
|
+
*/
|
|
42
|
+
const pkger = (pkg, version) => (!_.isEmpty(version)) ? `${pkg}:${version}` : pkg;
|
|
43
|
+
|
|
44
|
+
/*
|
|
45
|
+
* Helper to parse apache config
|
|
46
|
+
*/
|
|
47
|
+
const parseApache = options => {
|
|
48
|
+
if (options.ssl) options.defaultFiles.vhosts = 'default-ssl.conf';
|
|
49
|
+
options.volumes.push(`${options.confDest}/${options.defaultFiles.vhosts}:${options.remoteFiles.vhosts}`);
|
|
50
|
+
if (options.version === '5.3') options.environment.APACHE_LOG_DIR = '/var/log';
|
|
51
|
+
return options;
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
/*
|
|
55
|
+
* Helper to parse cli config
|
|
56
|
+
*/
|
|
57
|
+
const parseCli = options => {
|
|
58
|
+
options.command = [_.get(options, 'command', 'tail -f /dev/null')];
|
|
59
|
+
return options;
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
/*
|
|
63
|
+
* Helper to parse nginx config
|
|
64
|
+
*/
|
|
65
|
+
const parseNginx = options => {
|
|
66
|
+
options.command = (process.platform !== 'win32') ? ['php-fpm'] : ['php-fpm -R'];
|
|
67
|
+
options.image = 'fpm';
|
|
68
|
+
options.remoteFiles.vhosts = '/opt/bitnami/nginx/conf/lando.conf';
|
|
69
|
+
options.defaultFiles.vhosts = (options.ssl) ? 'default-ssl.conf.tpl' : 'default.conf.tpl';
|
|
70
|
+
options.nginxSsl = options.ssl;
|
|
71
|
+
options.ssl = false;
|
|
72
|
+
if (process.platform === 'win32') {
|
|
73
|
+
options.volumes.push(`${options.confDest}/zz-lando.conf:/usr/local/etc/php-fpm.d/zz-lando.conf`);
|
|
74
|
+
}
|
|
75
|
+
options.remoteFiles.pool = '/usr/local/etc/php-fpm.d/zz-lando.conf';
|
|
76
|
+
return options;
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
/*
|
|
80
|
+
* Helper to parse php config
|
|
81
|
+
*/
|
|
82
|
+
const parseConfig = options => {
|
|
83
|
+
switch (options.via.split(':')[0]) {
|
|
84
|
+
case 'apache': return parseApache(options);
|
|
85
|
+
case 'cli': return parseCli(options);
|
|
86
|
+
case 'nginx': return parseNginx(options);
|
|
87
|
+
}
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
// Builder
|
|
91
|
+
module.exports = {
|
|
92
|
+
name: 'php',
|
|
93
|
+
config: {
|
|
94
|
+
version: '7.4',
|
|
95
|
+
supported: ['8.1', '8.0', '7.4', '7.3', '7.2', '7.1', '7.0', '5.6', '5.5', '5.4', '5.3'],
|
|
96
|
+
legacy: ['7.2', '7.1', '7.0', '5.6', '5.5', '5.4', '5.3'],
|
|
97
|
+
gen2: ['5.5', '5.4', '5.3'],
|
|
98
|
+
gen3: ['7.2', '7.1', '7.0', '5.6'],
|
|
99
|
+
path: [
|
|
100
|
+
'/app/vendor/bin',
|
|
101
|
+
'/app/bin',
|
|
102
|
+
'/usr/local/sbin',
|
|
103
|
+
'/usr/local/bin',
|
|
104
|
+
'/usr/sbin',
|
|
105
|
+
'/usr/bin',
|
|
106
|
+
'/sbin',
|
|
107
|
+
'/bin',
|
|
108
|
+
'/var/www/.composer/vendor/bin',
|
|
109
|
+
'/helpers',
|
|
110
|
+
],
|
|
111
|
+
confSrc: __dirname,
|
|
112
|
+
command: ['sh -c \'a2enmod rewrite && apache2-foreground\''],
|
|
113
|
+
composer_version: '2.0.7',
|
|
114
|
+
image: 'apache',
|
|
115
|
+
defaultFiles: {
|
|
116
|
+
_php: 'php.ini',
|
|
117
|
+
vhosts: 'default.conf',
|
|
118
|
+
// server: @TODO? DO THE PEOPLE DEMAND IT?
|
|
119
|
+
},
|
|
120
|
+
environment: {
|
|
121
|
+
COMPOSER_ALLOW_SUPERUSER: 1,
|
|
122
|
+
COMPOSER_MEMORY_LIMIT: '-1',
|
|
123
|
+
PHP_MEMORY_LIMIT: '1G',
|
|
124
|
+
},
|
|
125
|
+
remoteFiles: {
|
|
126
|
+
_php: '/usr/local/etc/php/conf.d/xxx-lando-default.ini',
|
|
127
|
+
vhosts: '/etc/apache2/sites-enabled/000-default.conf',
|
|
128
|
+
php: '/usr/local/etc/php/conf.d/zzz-lando-my-custom.ini',
|
|
129
|
+
},
|
|
130
|
+
sources: [],
|
|
131
|
+
suffix: '4',
|
|
132
|
+
ssl: false,
|
|
133
|
+
via: 'apache',
|
|
134
|
+
volumes: ['/usr/local/bin'],
|
|
135
|
+
webroot: '.',
|
|
136
|
+
},
|
|
137
|
+
parent: '_appserver',
|
|
138
|
+
builder: (parent, config) => class LandoPhp extends parent {
|
|
139
|
+
constructor(id, options = {}, factory) {
|
|
140
|
+
options = parseConfig(_.merge({}, config, options));
|
|
141
|
+
// Mount our default php config
|
|
142
|
+
options.volumes.push(`${options.confDest}/${options.defaultFiles._php}:${options.remoteFiles._php}`);
|
|
143
|
+
|
|
144
|
+
// Shift on the docker entrypoint if this is a more recent version
|
|
145
|
+
if (options.version !== 'custom' && semver.gt(semver.coerce(options.version), '5.5.0')) {
|
|
146
|
+
options.command.unshift('docker-php-entrypoint');
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
// If xdebug is set to "true" then map it to "debug"
|
|
150
|
+
if (options.xdebug === true) options.xdebug = 'debug';
|
|
151
|
+
|
|
152
|
+
// If this is a legacy php version then switch the suffix
|
|
153
|
+
if (_.includes(options.gen3, options.version)) options.suffix = '3';
|
|
154
|
+
if (_.includes(options.gen2, options.version)) options.suffix = '2';
|
|
155
|
+
|
|
156
|
+
// Build the php
|
|
157
|
+
const php = {
|
|
158
|
+
image: `devwithlando/php:${options.version}-${options.image}-${options.suffix}`,
|
|
159
|
+
environment: _.merge({}, options.environment, {
|
|
160
|
+
PATH: options.path.join(':'),
|
|
161
|
+
LANDO_WEBROOT: `/app/${options.webroot}`,
|
|
162
|
+
XDEBUG_CONFIG: xdebugConfig(options._app.env.LANDO_HOST_IP),
|
|
163
|
+
XDEBUG_MODE: (options.xdebug === false) ? 'off' : options.xdebug,
|
|
164
|
+
}),
|
|
165
|
+
networks: (_.startsWith(options.via, 'nginx')) ? {default: {aliases: ['fpm']}} : {default: {}},
|
|
166
|
+
ports: (_.startsWith(options.via, 'apache') && options.version !== 'custom') ? ['80'] : [],
|
|
167
|
+
volumes: options.volumes,
|
|
168
|
+
command: options.command.join(' '),
|
|
169
|
+
};
|
|
170
|
+
options.info = {via: options.via};
|
|
171
|
+
|
|
172
|
+
// Add our composer things to run step
|
|
173
|
+
if (!_.isEmpty(options.composer)) {
|
|
174
|
+
const commands = utils.getInstallCommands(options.composer, pkger, ['composer', 'global', 'require']);
|
|
175
|
+
utils.addBuildStep(commands, options._app, options.name, 'build_internal');
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
// Add activate steps for xdebug
|
|
179
|
+
if (options.xdebug) {
|
|
180
|
+
utils.addBuildStep(['docker-php-ext-enable xdebug'], options._app, options.name, 'build_as_root_internal');
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
// Install the desired composer version
|
|
184
|
+
if (options.composer_version) {
|
|
185
|
+
const commands = [`/helpers/install-composer.sh ${options.composer_version}`];
|
|
186
|
+
utils.addBuildStep(commands, options._app, options.name, 'build_internal', true);
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
// Add in nginx if we need to
|
|
190
|
+
if (_.startsWith(options.via, 'nginx')) {
|
|
191
|
+
// Set another lando service we can pass down the stream
|
|
192
|
+
const nginxOpts = nginxConfig(options);
|
|
193
|
+
// Merge in any user specifified
|
|
194
|
+
const LandoNginx = factory.get('nginx');
|
|
195
|
+
const data = new LandoNginx(nginxOpts.name, nginxOpts);
|
|
196
|
+
// If the user has overriden this service lets make sure we include that as well
|
|
197
|
+
const userOverrides = _.get(options, `_app.config.services.${nginxOpts.name}.overrides`, {});
|
|
198
|
+
data.data.push({
|
|
199
|
+
services: _.set({}, nginxOpts.name, userOverrides),
|
|
200
|
+
version: _.get(data, 'data[0].version'),
|
|
201
|
+
});
|
|
202
|
+
// This is a trick to basically replicate what happens upstream
|
|
203
|
+
options._app.add(data);
|
|
204
|
+
options._app.info.push(data.info);
|
|
205
|
+
// Indicate the relationship on the primary service
|
|
206
|
+
options.info.served_by = nginxOpts.name;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
// Add in the php service and push downstream
|
|
210
|
+
options.sources.push({services: _.set({}, options.name, php)});
|
|
211
|
+
super(id, options, ..._.flatten(options.sources));
|
|
212
|
+
};
|
|
213
|
+
},
|
|
214
|
+
};
|
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
<VirtualHost *:80>
|
|
2
|
+
# WHAT IN THE WORLD HAPPENED TO YOU
|
|
3
|
+
# The ServerName directive sets the request scheme, hostname and port that
|
|
4
|
+
# the server uses to identify itself. This is used when creating
|
|
5
|
+
# redirection URLs. In the context of virtual hosts, the ServerName
|
|
6
|
+
# specifies what hostname must appear in the request's Host: header to
|
|
7
|
+
# match this virtual host. For the default virtual host (this file) this
|
|
8
|
+
# value is not decisive as it is used as a last resort host regardless.
|
|
9
|
+
# However, you must set it for any further virtual host explicitly.
|
|
10
|
+
ServerName appserver
|
|
11
|
+
|
|
12
|
+
ServerAdmin webmaster@localhost
|
|
13
|
+
DocumentRoot ${LANDO_WEBROOT}
|
|
14
|
+
<Directory />
|
|
15
|
+
Options Indexes FollowSymLinks MultiViews
|
|
16
|
+
AllowOverride All
|
|
17
|
+
Order allow,deny
|
|
18
|
+
Allow from all
|
|
19
|
+
Require all granted
|
|
20
|
+
</Directory>
|
|
21
|
+
|
|
22
|
+
# Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
|
|
23
|
+
# error, crit, alert, emerg.
|
|
24
|
+
# It is also possible to configure the loglevel for particular
|
|
25
|
+
# modules, e.g.
|
|
26
|
+
#LogLevel info ssl:warn
|
|
27
|
+
|
|
28
|
+
ErrorLog ${APACHE_LOG_DIR}/error.log
|
|
29
|
+
CustomLog ${APACHE_LOG_DIR}/access.log combined
|
|
30
|
+
|
|
31
|
+
# For most configuration files from conf-available/, which are
|
|
32
|
+
# enabled or disabled at a global level, it is possible to
|
|
33
|
+
# include a line for only one particular virtual host. For example the
|
|
34
|
+
# following line enables the CGI configuration for this host only
|
|
35
|
+
# after it has been globally disabled with "a2disconf".
|
|
36
|
+
#Include conf-available/serve-cgi-bin.conf
|
|
37
|
+
|
|
38
|
+
# Pass some common ENVs, its ok if this fails
|
|
39
|
+
SetEnv BACKDROP_SETTINGS ${BACKDROP_SETTINGS}
|
|
40
|
+
SetEnvIf x-forwarded-proto https HTTPS=on
|
|
41
|
+
|
|
42
|
+
</VirtualHost>
|
|
43
|
+
|
|
44
|
+
<IfModule mod_ssl.c>
|
|
45
|
+
<VirtualHost *:443>
|
|
46
|
+
ServerAdmin webmaster@localhost
|
|
47
|
+
ServerName appserver
|
|
48
|
+
|
|
49
|
+
DocumentRoot ${LANDO_WEBROOT}
|
|
50
|
+
<Directory />
|
|
51
|
+
Options Indexes FollowSymLinks MultiViews
|
|
52
|
+
AllowOverride All
|
|
53
|
+
Order allow,deny
|
|
54
|
+
Allow from all
|
|
55
|
+
Require all granted
|
|
56
|
+
</Directory>
|
|
57
|
+
# Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
|
|
58
|
+
# error, crit, alert, emerg.
|
|
59
|
+
# It is also possible to configure the loglevel for particular
|
|
60
|
+
# modules, e.g.
|
|
61
|
+
#LogLevel info ssl:warn
|
|
62
|
+
|
|
63
|
+
ErrorLog ${APACHE_LOG_DIR}/error.log
|
|
64
|
+
CustomLog ${APACHE_LOG_DIR}/access.log combined
|
|
65
|
+
|
|
66
|
+
# For most configuration files from conf-available/, which are
|
|
67
|
+
# enabled or disabled at a global level, it is possible to
|
|
68
|
+
# include a line for only one particular virtual host. For example the
|
|
69
|
+
# following line enables the CGI configuration for this host only
|
|
70
|
+
# after it has been globally disabled with "a2disconf".
|
|
71
|
+
#Include conf-available/serve-cgi-bin.conf
|
|
72
|
+
|
|
73
|
+
# SSL Engine Switch:
|
|
74
|
+
# Enable/Disable SSL for this virtual host.
|
|
75
|
+
SSLEngine on
|
|
76
|
+
|
|
77
|
+
# A self-signed (snakeoil) certificate can be created by installing
|
|
78
|
+
# the ssl-cert package. See
|
|
79
|
+
# /usr/share/doc/apache2/README.Debian.gz for more info.
|
|
80
|
+
# If both key and certificate are stored in the same file, only the
|
|
81
|
+
# SSLCertificateFile directive is needed.
|
|
82
|
+
SSLCertificateFile "/certs/cert.crt"
|
|
83
|
+
SSLCertificateKeyFile "/certs/cert.key"
|
|
84
|
+
|
|
85
|
+
# Server Certificate Chain:
|
|
86
|
+
# Point SSLCertificateChainFile at a file containing the
|
|
87
|
+
# concatenation of PEM encoded CA certificates which form the
|
|
88
|
+
# certificate chain for the server certificate. Alternatively
|
|
89
|
+
# the referenced file can be the same as SSLCertificateFile
|
|
90
|
+
# when the CA certificates are directly appended to the server
|
|
91
|
+
# certificate for convenience.
|
|
92
|
+
#SSLCertificateChainFile /etc/apache2/ssl.crt/server-ca.crt
|
|
93
|
+
|
|
94
|
+
# Certificate Authority (CA):
|
|
95
|
+
# Set the CA certificate verification path where to find CA
|
|
96
|
+
# certificates for client authentication or alternatively one
|
|
97
|
+
# huge file containing all of them (file must be PEM encoded)
|
|
98
|
+
# Note: Inside SSLCACertificatePath you need hash symlinks
|
|
99
|
+
# to point to the certificate files. Use the provided
|
|
100
|
+
# Makefile to update the hash symlinks after changes.
|
|
101
|
+
#SSLCACertificatePath /etc/ssl/certs/
|
|
102
|
+
#SSLCACertificateFile /etc/apache2/ssl.crt/ca-bundle.crt
|
|
103
|
+
|
|
104
|
+
# Certificate Revocation Lists (CRL):
|
|
105
|
+
# Set the CA revocation path where to find CA CRLs for client
|
|
106
|
+
# authentication or alternatively one huge file containing all
|
|
107
|
+
# of them (file must be PEM encoded)
|
|
108
|
+
# Note: Inside SSLCARevocationPath you need hash symlinks
|
|
109
|
+
# to point to the certificate files. Use the provided
|
|
110
|
+
# Makefile to update the hash symlinks after changes.
|
|
111
|
+
#SSLCARevocationPath /etc/apache2/ssl.crl/
|
|
112
|
+
#SSLCARevocationFile /etc/apache2/ssl.crl/ca-bundle.crl
|
|
113
|
+
|
|
114
|
+
# Client Authentication (Type):
|
|
115
|
+
# Client certificate verification type and depth. Types are
|
|
116
|
+
# none, optional, require and optional_no_ca. Depth is a
|
|
117
|
+
# number which specifies how deeply to verify the certificate
|
|
118
|
+
# issuer chain before deciding the certificate is not valid.
|
|
119
|
+
#SSLVerifyClient require
|
|
120
|
+
#SSLVerifyDepth 10
|
|
121
|
+
|
|
122
|
+
# SSL Engine Options:
|
|
123
|
+
# Set various options for the SSL engine.
|
|
124
|
+
# o FakeBasicAuth:
|
|
125
|
+
# Translate the client X.509 into a Basic Authorisation. This means that
|
|
126
|
+
# the standard Auth/DBMAuth methods can be used for access control. The
|
|
127
|
+
# user name is the `one line' version of the client's X.509 certificate.
|
|
128
|
+
# Note that no password is obtained from the user. Every entry in the user
|
|
129
|
+
# file needs this password: `xxj31ZMTZzkVA'.
|
|
130
|
+
# o ExportCertData:
|
|
131
|
+
# This exports two additional environment variables: SSL_CLIENT_CERT and
|
|
132
|
+
# SSL_SERVER_CERT. These contain the PEM-encoded certificates of the
|
|
133
|
+
# server (always existing) and the client (only existing when client
|
|
134
|
+
# authentication is used). This can be used to import the certificates
|
|
135
|
+
# into CGI scripts.
|
|
136
|
+
# o StdEnvVars:
|
|
137
|
+
# This exports the standard SSL/TLS related `SSL_*' environment variables.
|
|
138
|
+
# Per default this exportation is switched off for performance reasons,
|
|
139
|
+
# because the extraction step is an expensive operation and is usually
|
|
140
|
+
# useless for serving static content. So one usually enables the
|
|
141
|
+
# exportation for CGI and SSI requests only.
|
|
142
|
+
# o OptRenegotiate:
|
|
143
|
+
# This enables optimized SSL connection renegotiation handling when SSL
|
|
144
|
+
# directives are used in per-directory context.
|
|
145
|
+
#SSLOptions +FakeBasicAuth +ExportCertData +StrictRequire
|
|
146
|
+
<FilesMatch "\.(cgi|shtml|phtml|php)$">
|
|
147
|
+
SSLOptions +StdEnvVars
|
|
148
|
+
</FilesMatch>
|
|
149
|
+
<Directory /usr/lib/cgi-bin>
|
|
150
|
+
SSLOptions +StdEnvVars
|
|
151
|
+
</Directory>
|
|
152
|
+
|
|
153
|
+
# SSL Protocol Adjustments:
|
|
154
|
+
# The safe and default but still SSL/TLS standard compliant shutdown
|
|
155
|
+
# approach is that mod_ssl sends the close notify alert but doesn't wait for
|
|
156
|
+
# the close notify alert from client. When you need a different shutdown
|
|
157
|
+
# approach you can use one of the following variables:
|
|
158
|
+
# o ssl-unclean-shutdown:
|
|
159
|
+
# This forces an unclean shutdown when the connection is closed, i.e. no
|
|
160
|
+
# SSL close notify alert is send or allowed to received. This violates
|
|
161
|
+
# the SSL/TLS standard but is needed for some brain-dead browsers. Use
|
|
162
|
+
# this when you receive I/O errors because of the standard approach where
|
|
163
|
+
# mod_ssl sends the close notify alert.
|
|
164
|
+
# o ssl-accurate-shutdown:
|
|
165
|
+
# This forces an accurate shutdown when the connection is closed, i.e. a
|
|
166
|
+
# SSL close notify alert is send and mod_ssl waits for the close notify
|
|
167
|
+
# alert of the client. This is 100% SSL/TLS standard compliant, but in
|
|
168
|
+
# practice often causes hanging connections with brain-dead browsers. Use
|
|
169
|
+
# this only for browsers where you know that their SSL implementation
|
|
170
|
+
# works correctly.
|
|
171
|
+
# Notice: Most problems of broken clients are also related to the HTTP
|
|
172
|
+
# keep-alive facility, so you usually additionally want to disable
|
|
173
|
+
# keep-alive for those clients, too. Use variable "nokeepalive" for this.
|
|
174
|
+
# Similarly, one has to force some clients to use HTTP/1.0 to workaround
|
|
175
|
+
# their broken HTTP/1.1 implementation. Use variables "downgrade-1.0" and
|
|
176
|
+
# "force-response-1.0" for this.
|
|
177
|
+
BrowserMatch "MSIE [2-6]" \
|
|
178
|
+
nokeepalive ssl-unclean-shutdown \
|
|
179
|
+
downgrade-1.0 force-response-1.0
|
|
180
|
+
# MSIE 7 and newer should be able to use keepalive
|
|
181
|
+
BrowserMatch "MSIE [17-9]" ssl-unclean-shutdown
|
|
182
|
+
|
|
183
|
+
# Pass some common ENVs, its ok if this fails
|
|
184
|
+
SetEnv BACKDROP_SETTINGS ${BACKDROP_SETTINGS}
|
|
185
|
+
SetEnvIf x-forwarded-proto https HTTPS=on
|
|
186
|
+
|
|
187
|
+
</VirtualHost>
|
|
188
|
+
</IfModule>
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
server {
|
|
2
|
+
listen 443 ssl;
|
|
3
|
+
listen 80;
|
|
4
|
+
listen [::]:80 default ipv6only=on;
|
|
5
|
+
server_name localhost;
|
|
6
|
+
|
|
7
|
+
ssl_certificate /certs/cert.crt;
|
|
8
|
+
ssl_certificate_key /certs/cert.key;
|
|
9
|
+
|
|
10
|
+
ssl_session_cache shared:SSL:1m;
|
|
11
|
+
ssl_session_timeout 5m;
|
|
12
|
+
|
|
13
|
+
ssl_ciphers HIGH:!aNULL:!MD5;
|
|
14
|
+
ssl_prefer_server_ciphers on;
|
|
15
|
+
|
|
16
|
+
root "{{LANDO_WEBROOT}}";
|
|
17
|
+
index index.php index.html index.htm;
|
|
18
|
+
|
|
19
|
+
location ~ \.php$ {
|
|
20
|
+
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
|
|
21
|
+
fastcgi_pass fpm:9000;
|
|
22
|
+
fastcgi_index index.php;
|
|
23
|
+
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
|
24
|
+
fastcgi_buffers 256 128k;
|
|
25
|
+
fastcgi_connect_timeout 300s;
|
|
26
|
+
fastcgi_send_timeout 300s;
|
|
27
|
+
fastcgi_read_timeout 300s;
|
|
28
|
+
include fastcgi_params;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
<VirtualHost *:80>
|
|
2
|
+
# WHAT IN THE WORLD HAPPENED TO YOU
|
|
3
|
+
# The ServerName directive sets the request scheme, hostname and port that
|
|
4
|
+
# the server uses to identify itself. This is used when creating
|
|
5
|
+
# redirection URLs. In the context of virtual hosts, the ServerName
|
|
6
|
+
# specifies what hostname must appear in the request's Host: header to
|
|
7
|
+
# match this virtual host. For the default virtual host (this file) this
|
|
8
|
+
# value is not decisive as it is used as a last resort host regardless.
|
|
9
|
+
# However, you must set it for any further virtual host explicitly.
|
|
10
|
+
ServerName appserver
|
|
11
|
+
|
|
12
|
+
ServerAdmin webmaster@localhost
|
|
13
|
+
DocumentRoot ${LANDO_WEBROOT}
|
|
14
|
+
<Directory />
|
|
15
|
+
Options Indexes FollowSymLinks MultiViews
|
|
16
|
+
AllowOverride All
|
|
17
|
+
Order allow,deny
|
|
18
|
+
Allow from all
|
|
19
|
+
Require all granted
|
|
20
|
+
</Directory>
|
|
21
|
+
|
|
22
|
+
# Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
|
|
23
|
+
# error, crit, alert, emerg.
|
|
24
|
+
# It is also possible to configure the loglevel for particular
|
|
25
|
+
# modules, e.g.
|
|
26
|
+
#LogLevel info ssl:warn
|
|
27
|
+
|
|
28
|
+
ErrorLog ${APACHE_LOG_DIR}/error.log
|
|
29
|
+
CustomLog ${APACHE_LOG_DIR}/access.log combined
|
|
30
|
+
|
|
31
|
+
# For most configuration files from conf-available/, which are
|
|
32
|
+
# enabled or disabled at a global level, it is possible to
|
|
33
|
+
# include a line for only one particular virtual host. For example the
|
|
34
|
+
# following line enables the CGI configuration for this host only
|
|
35
|
+
# after it has been globally disabled with "a2disconf".
|
|
36
|
+
#Include conf-available/serve-cgi-bin.conf
|
|
37
|
+
|
|
38
|
+
# Pass some common ENVs, its ok if this fails
|
|
39
|
+
SetEnv BACKDROP_SETTINGS ${BACKDROP_SETTINGS}
|
|
40
|
+
|
|
41
|
+
</VirtualHost>
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
server {
|
|
2
|
+
listen 80;
|
|
3
|
+
listen [::]:80 default ipv6only=on;
|
|
4
|
+
server_name localhost;
|
|
5
|
+
|
|
6
|
+
root "{{LANDO_WEBROOT}}";
|
|
7
|
+
index index.php index.html index.htm;
|
|
8
|
+
|
|
9
|
+
location ~ \.php$ {
|
|
10
|
+
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
|
|
11
|
+
fastcgi_pass fpm:9000;
|
|
12
|
+
fastcgi_index index.php;
|
|
13
|
+
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
|
14
|
+
fastcgi_buffers 256 128k;
|
|
15
|
+
fastcgi_connect_timeout 300s;
|
|
16
|
+
fastcgi_send_timeout 300s;
|
|
17
|
+
fastcgi_read_timeout 300s;
|
|
18
|
+
include fastcgi_params;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
[PHP]
|
|
2
|
+
|
|
3
|
+
;;;;;;;;;;;;;;;
|
|
4
|
+
; PHP Globals ;
|
|
5
|
+
;;;;;;;;;;;;;;;
|
|
6
|
+
|
|
7
|
+
short_open_tag = Off
|
|
8
|
+
output_buffering = 4096
|
|
9
|
+
allow_call_time_pass_reference = Off
|
|
10
|
+
request_order = "GP"
|
|
11
|
+
register_long_arrays = Off
|
|
12
|
+
register_argc_argv = Off
|
|
13
|
+
magic_quotes_gpc = Off
|
|
14
|
+
enable_dl = Off
|
|
15
|
+
allow_url_fopen = On
|
|
16
|
+
realpath_cache_size = "800K"
|
|
17
|
+
realpath_cache_ttl = "86400"
|
|
18
|
+
disable_functions =
|
|
19
|
+
sendmail_path=/bin/true
|
|
20
|
+
|
|
21
|
+
[Date]
|
|
22
|
+
date.timezone = "UTC"
|
|
23
|
+
|
|
24
|
+
;;;;;;;;;;;;;;;;;;;;;;
|
|
25
|
+
;; PACKAGE SETTINGS ;;
|
|
26
|
+
;;;;;;;;;;;;;;;;;;;;;;
|
|
27
|
+
|
|
28
|
+
; Xdebug
|
|
29
|
+
xdebug.max_nesting_level = 512
|
|
30
|
+
xdebug.remote_autostart = 1
|
|
31
|
+
xdebug.start_with_request = trigger
|
|
32
|
+
xdebug.mode = ${XDEBUG_MODE}
|
|
33
|
+
|
|
34
|
+
; Globals
|
|
35
|
+
expose_php = on
|
|
36
|
+
max_execution_time = 90
|
|
37
|
+
max_input_time = 900
|
|
38
|
+
max_input_vars = 10000
|
|
39
|
+
memory_limit = ${PHP_MEMORY_LIMIT}
|
|
40
|
+
upload_max_filesize = 100M
|
|
41
|
+
post_max_size = 100M
|
|
42
|
+
error_reporting = E_ALL & ~E_DEPRECATED
|
|
43
|
+
ignore_repeated_errors = on
|
|
44
|
+
html_errors = off
|
|
45
|
+
display_errors = on
|
|
46
|
+
log_errors = on
|