improve snippets
This commit is contained in:
parent
7967334e7d
commit
39a5683b9e
9
dist/smartnginx.snippets.js
vendored
9
dist/smartnginx.snippets.js
vendored
@ -1,5 +1,6 @@
|
||||
"use strict";
|
||||
const plugins = require("./smartnginx.plugins");
|
||||
const paths = require("./smartnginx.paths");
|
||||
exports.getBaseConfigString = () => {
|
||||
let baseConfig = plugins.smartstring.indent.normalize(`
|
||||
user www-data;
|
||||
@ -63,7 +64,7 @@ exports.getBaseConfigString = () => {
|
||||
# Virtual Host Configs
|
||||
##
|
||||
|
||||
include /etc/nginx/conf.d/*.conf;
|
||||
include ${paths.nginxHostFileBase}/*.conf;
|
||||
include /etc/nginx/sites-enabled/*;
|
||||
}
|
||||
daemon off;
|
||||
@ -85,8 +86,8 @@ exports.getHostConfigString = (hostNameArg, destinationIpArg) => {
|
||||
server {
|
||||
listen *:443 ssl;
|
||||
server_name ${hostNameArg};
|
||||
ssl_certificate /LE_CERTS/${hostNameArg}/fullchain.pem;
|
||||
ssl_certificate_key /LE_CERTS/${hostNameArg}/privkey.pem;
|
||||
ssl_certificate ${paths.nginxCertBase}/${hostNameArg}/fullchain.pem;
|
||||
ssl_certificate_key ${paths.nginxCertBase}/${hostNameArg}/privkey.pem;
|
||||
|
||||
location / {
|
||||
proxy_pass http://${hostNameArg};
|
||||
@ -99,4 +100,4 @@ exports.getHostConfigString = (hostNameArg, destinationIpArg) => {
|
||||
`);
|
||||
return hostConfig;
|
||||
};
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic21hcnRuZ2lueC5zbmlwcGV0cy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3RzL3NtYXJ0bmdpbnguc25pcHBldHMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLE1BQVksT0FBTyxXQUFNLHNCQUFzQixDQUFDLENBQUE7QUFDckMsMkJBQW1CLEdBQUc7SUFDaEMsSUFBSSxVQUFVL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Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7O2FBOEQxQyxLQUFLLENBQUMsaUJBQWlCOzs7O0VBSWxDLENBQUMsQ0FBQztJQUNILE1BQU0sQ0FBQyxVQUFVLENBQUM7QUFDbkIsQ0FBQyxDQUFBO0FBR1UsMkJBQW1CLEdBQUcsQ0FBQyxXQUFrQixFQUFDLGdCQUF1QjtJQUMzRSxJQUFJLFVBQVUsR0FBRyxPQUFPLENBQUMsV0FBVyxDQUFDLE1BQU0sQ0FBQyxTQUFTLENBQUM7YUFDMUMsV0FBVztZQUNaLGdCQUFnQjs7Ozs7aUJBS1gsV0FBVzs4QkFDRSxXQUFXOzs7OztpQkFLeEIsV0FBVztxQkFDUCxLQUFLLENBQUMsYUFBYSxJQUFJLFdBQVc7eUJBQzlCLEtBQUssQ0FBQyxhQUFhLElBQUksV0FBVzs7O3dCQUduQyxXQUFXOzs7Ozs7O0VBT2pDLENBQUMsQ0FBQztJQUNILE1BQU0sQ0FBQyxVQUFVLENBQUM7QUFDbkIsQ0FBQyxDQUFDIn0=
|
@ -1,4 +1,5 @@
|
||||
import * as plugins from "./smartnginx.plugins";
|
||||
import * as paths from "./smartnginx.paths";
|
||||
export let getBaseConfigString = () => {
|
||||
let baseConfig = plugins.smartstring.indent.normalize(`
|
||||
user www-data;
|
||||
@ -62,7 +63,7 @@ export let getBaseConfigString = () => {
|
||||
# Virtual Host Configs
|
||||
##
|
||||
|
||||
include /etc/nginx/conf.d/*.conf;
|
||||
include ${paths.nginxHostFileBase}/*.conf;
|
||||
include /etc/nginx/sites-enabled/*;
|
||||
}
|
||||
daemon off;
|
||||
@ -86,8 +87,8 @@ export let getHostConfigString = (hostNameArg:string,destinationIpArg:string) =>
|
||||
server {
|
||||
listen *:443 ssl;
|
||||
server_name ${hostNameArg};
|
||||
ssl_certificate /LE_CERTS/${hostNameArg}/fullchain.pem;
|
||||
ssl_certificate_key /LE_CERTS/${hostNameArg}/privkey.pem;
|
||||
ssl_certificate ${paths.nginxCertBase}/${hostNameArg}/fullchain.pem;
|
||||
ssl_certificate_key ${paths.nginxCertBase}/${hostNameArg}/privkey.pem;
|
||||
|
||||
location / {
|
||||
proxy_pass http://${hostNameArg};
|
||||
|
Loading…
Reference in New Issue
Block a user