Change to sites-available instead of sites-enabled (#31)

* change from sites-enabled to sites-available

* add yarn.lock

* removed yarn.lock

* commands fix

* ZIP symbolic link
This commit is contained in:
Michael Leer 2018-11-20 13:12:25 +00:00 committed by Bálint Szekeres
parent d339981138
commit ff1ae92ef7
4 changed files with 22 additions and 4 deletions

1
.gitignore vendored
View file

@ -2,3 +2,4 @@ node_modules
cypress/videos
.deploy_rsa
.deploy_rsa.pub
yarn.lock

View file

@ -312,10 +312,17 @@
var content = sourceCode.children[0].children[0].innerText;
zip.file(name, content);
if (name.match(/^sites-available\//)) {
zip.file(name.replace(/^sites-available\//, 'sites-enabled/'), '../' + name, {
unixPermissions: parseInt('120755', 8),
});
}
}
zip.generateAsync({
type: 'blob',
platform: 'UNIX',
}).then(function(content) {
saveAs(content, 'nginxconfig.io-' + $scope.domain() + '.zip');
});

View file

@ -757,7 +757,7 @@
<div class="container">
<div class="row grid">
<div class="grid-sizer col-xl-6"></div>
<div ng-if="(isHTTPS() && (isCertLetsEncrypt() || !isSSLProfileModern()))" class="grid-item col-xl-10 offset-xl-1" ng-cloak>
<div ng-if="isModularized() || (isHTTPS() && (isCertLetsEncrypt() || !isSSLProfileModern()))" class="grid-item col-xl-10 offset-xl-1" ng-cloak>
<div class="commands">
<pre><code class="hljs bash" ng-include="'templates/commands.html?v=COMMIT_HASH'"></code></pre>
</div>
@ -773,12 +773,12 @@
</div><div id="file-nginx" class="code highlighted"></div>
</section>
<section class="col-xl-6 grid-item file" ng-if="isModularized()" ng-cloak>
<strong>/etc/nginx/sites-enabled/{{ domain() }}.conf</strong>
<strong>/etc/nginx/sites-available/{{ domain() }}.conf</strong>
<button class="btn btn-light btn-clipboard" ngclipboard data-clipboard-target="#file-domain" ngclipboard-success="clipboardSuccess('example.com')">
<img src="assets/img/clipboard-dark.svg" alt="Copy to clipboard">
</button>
<span class="clipboard-success" ng-if="clipboardCopy === 'example.com'">Copied!</span>
<div class="code source" data-filename="sites-enabled/{{ domain() }}.conf">
<div class="code source" data-filename="sites-available/{{ domain() }}.conf">
<pre><code class="nginx" ng-include="'templates/conf/sites-available/example.com.conf.html?v=COMMIT_HASH?v=COMMIT_HASH'" onload="refreshHighlighting()"></code></pre>
</div><div id="file-domain" class="code highlighted"></div>
</section>

View file

@ -1,4 +1,14 @@
<!--
<!-- ✔ modularized --><span ng-if="isModularized()"><!--
--><span class="hljs-comment"># <strong>Virtual host</strong>: create symbolic link</span>
<span class="hljs-section">ln</span> <span class="hljs-attribute">-s</span> /etc/nginx/sites-available/{{ domain() }}.conf /etc/nginx/sites-enabled/{{ domain() }}.conf</span><!--
✔ modularized || ✔ HTTPS --><span ng-if="isModularized() && ((isHTTPS() && !isSSLProfileModern()) || isCertLetsEncrypt())">
</span><!--
✔ HTTPS --><span ng-if="isHTTPS() && !isSSLProfileModern()"><!--
--><span class="hljs-comment"># <strong>HTTPS</strong>: create Diffie-Hellman keys</span>