include order fixes

pull/2/head
Szekeres Bálint 7 years ago
parent ccdd4ec318
commit 3e55b6cd97

@ -250,7 +250,7 @@
<pre><code class="nginx" ng-include="'templates/_ssl.conf.html'" onload="refreshHighlighting()"></code></pre>
</div><div id="file-ssl" class="code highlighted"></div>
</div>
<div class="col-xl-6 file" ng-if="data.https">
<div class="col-xl-6 file" ng-if="data.file_structure === 'separated' && data.https">
<strong>/etc/nginx/_letsencrypt.conf</strong>
<button class="btn btn-light btn-clipboard" ngclipboard data-clipboard-target="#file-letsencrypt" ngclipboard-success="clipboardSuccess('_letsencrypt.conf')">
<img src="https://cdn.nginxconfig.io/assets/img/clipboard-dark.svg" alt="Copy to clipboard">

@ -6,7 +6,7 @@ add_header X-UA-Compatible "IE=Edge" always;
add_header Cache-Control "no-transform" always;
# . files
location ~ /\.(?!well-known).* {
location ~ /\. {
deny all;
}<span ng-if="data.expires_assets !== '' && data.expires_assets !== data.expires_media">

@ -1,3 +1,4 @@
# ACME-challenge
location ^~ /.well-known/acme-challenge/ {
default_type "text/plain";
root /var/www/_letsencrypt;

@ -16,7 +16,6 @@ ssl_prefer_server_ciphers on;
add_header Strict-Transport-Security "max-age=15768000" always;
# OCSP Stapling
# fetch OCSP records from URL in ssl_certificate and cache them
ssl_stapling on;
ssl_stapling_verify on;

@ -15,21 +15,20 @@ server {
location / {
try_files $uri $uri/ {{ data.index_html ? '/index.html' : '' }}{{ data.index_html && data.php !== 'off' && data.index_php ? ' ' : '' }}{{ data.php !== 'off' && data.index_php ? '/index.php?$query_string' : '' }};
}</span>
<span ng-if="data.file_structure === 'separated'">
include _ssl.conf;<span ng-if="data.file_structure === 'separated'">
include _letsencrypt.conf;
include _general.conf;<span ng-if="data.php !== 'off' && data.wordpress">
include _wordpress.conf;</span><span ng-if="data.php !== 'off'">
include _php.conf;</span>
include _letsencrypt.conf;
include _ssl.conf;</span><span ng-if="data.file_structure === 'unified'">
<ng-include ng-include-tabs="2" src="'templates/_general.conf.html'" onload="refreshHighlighting()"></ng-include><span ng-if="data.php !== 'off' && data.wordpress">
include _php.conf;</span></span><span ng-if="data.file_structure === 'unified'">
<ng-include ng-include-tabs="2" src="'templates/_wordpress.conf.html'" onload="refreshHighlighting()"></ng-include></span><span ng-if="data.php !== 'off'">
<ng-include ng-include-tabs="2" src="'templates/_letsencrypt.conf.html'" onload="refreshHighlighting()"></ng-include>
<ng-include ng-include-tabs="2" src="'templates/_php.conf.html'" onload="refreshHighlighting()"></ng-include></span>
<ng-include ng-include-tabs="2" src="'templates/_general.conf.html'" onload="refreshHighlighting()"></ng-include><span ng-if="data.php !== 'off' && data.wordpress">
<ng-include ng-include-tabs="2" src="'templates/_letsencrypt.conf.html'" onload="refreshHighlighting()"></ng-include></span><span ng-if="data.file_structure === 'unified'">
<ng-include ng-include-tabs="2" src="'templates/_wordpress.conf.html'" onload="refreshHighlighting()"></ng-include></span><span ng-if="data.php !== 'off'">
include _ssl.conf;</span>
<ng-include ng-include-tabs="2" src="'templates/_php.conf.html'" onload="refreshHighlighting()"></ng-include></span></span>
}<span ng-if="data.cdn">
# CDN
@ -53,7 +52,10 @@ server {
gzip_comp_level 6;
gzip_types {{ gzipTypes }};</span>
include _ssl.conf;
include _ssl.conf;<span ng-if="data.file_structure === 'separated'">
include _letsencrypt.conf;</span><span ng-if="data.file_structure === 'unified'">
<ng-include ng-include-tabs="2" src="'templates/_letsencrypt.conf.html'" onload="refreshHighlighting()"></ng-include></span>
location ~* \.(?:{{ extensions.assets }}|{{ extensions.fonts }}|{{ extensions.svg }}|{{ extensions.images }}|{{ extensions.audio }}|{{ extensions.video }}|{{ extensions.docs }})$ {
add_header Access-Control-Allow-Origin "*";
@ -77,7 +79,10 @@ server {
ssl_certificate_key /etc/letsencrypt/live/{{ data.domain }}/privkey.pem;
ssl_trusted_certificate /etc/letsencrypt/live/{{ data.domain }}/fullchain.pem;
include _ssl.conf;
include _ssl.conf;<span ng-if="data.file_structure === 'separated'">
include _letsencrypt.conf;</span><span ng-if="data.file_structure === 'unified'">
<ng-include ng-include-tabs="2" src="'templates/_letsencrypt.conf.html'" onload="refreshHighlighting()"></ng-include></span>
return 301 https://{{ !data.non_www ? 'www.' : '' }}{{ data.domain }}$request_uri;
}

@ -37,5 +37,6 @@ http {
include /etc/nginx/conf.d/*.conf;<span ng-if="data.file_structure === 'separated'">
include /etc/nginx/sites-enabled/*;</span><span ng-if="data.file_structure === 'unified'">
# {{ !data.non_www ? 'www.' : '' }}{{ data.domain }}
<ng-include ng-include-tabs="1" src="'templates/example.com.conf.html'" sonload="refreshHighlighting()"></ng-include></span>
}

Loading…
Cancel
Save