Compare commits

...

8 Commits

Author SHA1 Message Date
e3817f92c7 2.0.47 2019-04-11 02:01:45 +02:00
159c043ba6 fix(core): update 2019-04-11 02:01:44 +02:00
fbdb98c355 2.0.46 2019-04-11 01:42:49 +02:00
b81dc319e2 fix(core): update 2019-04-11 01:42:48 +02:00
eec249d68f 2.0.45 2019-04-11 01:32:08 +02:00
0f4a5b0cc1 fix(core): update 2019-04-11 01:32:08 +02:00
20c23751a4 2.0.44 2019-04-11 00:40:34 +02:00
6aaae7683b fix(core): update 2019-04-11 00:40:33 +02:00
4 changed files with 10 additions and 10 deletions

2
package-lock.json generated
View File

@ -1,6 +1,6 @@
{
"name": "@pushrocks/smartnginx",
"version": "2.0.43",
"version": "2.0.47",
"lockfileVersion": 1,
"requires": true,
"dependencies": {

View File

@ -1,6 +1,6 @@
{
"name": "@pushrocks/smartnginx",
"version": "2.0.43",
"version": "2.0.47",
"private": false,
"description": "control nginx from node, TypeScript ready",
"main": "dist/index.js",

View File

@ -119,11 +119,11 @@ export class SmartNginx {
// write standard self signed certificate
const selfsignedCert = plugins.selfsigned.generate([{ name: 'commonName', value: 'selfsigned.git.zone' }], { days: 365});
plugins.smartfile.memory.toFsSync(selfsignedCert.private, plugins.path.join(paths.nginxConfigDirPath, './default.private.pem'));
plugins.smartfile.memory.toFsSync(selfsignedCert.public, plugins.path.join(paths.nginxConfigDirPath, './default.public.pem'));
// deploy hosts
plugins.smartfile.fs.ensureEmptyDirSync(paths.nginxHostDirPath);
plugins.smartfile.fs.ensureDirSync(paths.nginxHostDirPath);
plugins.smartfile.memory.toFsSync(selfsignedCert.private, plugins.path.join(paths.nginxHostDirPath, './default.private.pem'));
plugins.smartfile.memory.toFsSync(selfsignedCert.cert, plugins.path.join(paths.nginxHostDirPath, './default.public.pem'));
for (const host of this.deployedHosts.getArray()) {
await host.deploy();
this.logger.log('info', `Host ${host.hostName} deployed!`);

View File

@ -64,14 +64,14 @@ export let getBaseConfigString = (defaultProxy: string) => {
##
server {
listen *:80;
server_name selfsigned.git.zone
listen *:80 default_server;
server_name selfsigned.git.zone;
rewrite ^ ${defaultProxy} permanent;
}
server {
listen *:443 ssl;
server_name selfsigned.git.zone
listen *:443 ssl default_server;
server_name selfsigned.git.zone;
ssl_certificate ${paths.nginxHostDirPath}/default.public.pem;
ssl_certificate_key ${paths.nginxHostDirPath}/default.private.pem;
rewrite ^ ${defaultProxy} permanent;