location / moved to example.com, index_php flag
parent
6869c15733
commit
0c03745b7f
|
@ -16,6 +16,7 @@
|
||||||
cdn: false,
|
cdn: false,
|
||||||
non_www: true,
|
non_www: true,
|
||||||
php: '7.2',
|
php: '7.2',
|
||||||
|
index_php: true,
|
||||||
index_html: false,
|
index_html: false,
|
||||||
wordpress: false,
|
wordpress: false,
|
||||||
|
|
||||||
|
|
|
@ -64,6 +64,12 @@
|
||||||
<span class="info">non-www</span>
|
<span class="info">non-www</span>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="form-check">
|
||||||
|
<input class="form-check-input" type="checkbox" id="index_html" ng-model="data.index_html">
|
||||||
|
<label class="form-check-label" for="index_html">
|
||||||
|
<span class="info">index.html</span>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="card">
|
<div class="card">
|
||||||
|
@ -80,9 +86,9 @@
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-check" ng-if="data.php !== 'off'">
|
<div class="form-check" ng-if="data.php !== 'off'">
|
||||||
<input class="form-check-input" type="checkbox" id="index_html" ng-model="data.index_html">
|
<input class="form-check-input" type="checkbox" id="index_php" ng-model="data.index_php">
|
||||||
<label class="form-check-label" for="index_html">
|
<label class="form-check-label" for="index_php">
|
||||||
<span class="info">index.html</span>
|
<span class="info">index.php</span>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-check" ng-if="data.php !== 'off'">
|
<div class="form-check" ng-if="data.php !== 'off'">
|
||||||
|
|
|
@ -1,11 +1,6 @@
|
||||||
# index
|
# index
|
||||||
index {{ data.index_html ? 'index.html ' : '' }}index.php;
|
index {{ data.index_html ? 'index.html ' : '' }}index.php;
|
||||||
|
|
||||||
# process with {{ data.index_html ? 'index.html, ' : '' }}index.php
|
|
||||||
location / {
|
|
||||||
try_files $uri $uri/ {{ data.index_html ? '/index.html ' : '' }}/index.php?$query_string;
|
|
||||||
}
|
|
||||||
|
|
||||||
# handle .php
|
# handle .php
|
||||||
location ~ \.php$ {<span ng-if="data.file_structure === 'separated'">
|
location ~ \.php$ {<span ng-if="data.file_structure === 'separated'">
|
||||||
include _php_fastcgi.conf;
|
include _php_fastcgi.conf;
|
||||||
|
|
|
@ -10,7 +10,11 @@ server {
|
||||||
|
|
||||||
ssl_certificate /etc/letsencrypt/live/{{ data.domain }}/fullchain.pem;
|
ssl_certificate /etc/letsencrypt/live/{{ data.domain }}/fullchain.pem;
|
||||||
ssl_certificate_key /etc/letsencrypt/live/{{ data.domain }}/privkey.pem;
|
ssl_certificate_key /etc/letsencrypt/live/{{ data.domain }}/privkey.pem;
|
||||||
ssl_trusted_certificate /etc/letsencrypt/live/{{ data.domain }}/fullchain.pem;
|
ssl_trusted_certificate /etc/letsencrypt/live/{{ data.domain }}/fullchain.pem;<span ng-if="(data.php !== 'off' && data.index_php) || data.index_html">
|
||||||
|
|
||||||
|
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'">
|
<span ng-if="data.file_structure === 'separated'">
|
||||||
include _general.conf;<span ng-if="data.php !== 'off' && data.wordpress">
|
include _general.conf;<span ng-if="data.php !== 'off' && data.wordpress">
|
||||||
include _wordpress.conf;</span><span ng-if="data.php !== 'off'">
|
include _wordpress.conf;</span><span ng-if="data.php !== 'off'">
|
||||||
|
@ -96,7 +100,11 @@ server {
|
||||||
server_name {{ !data.non_www ? 'www.' : '' }}{{ data.domain }};<span ng-if="data.php !== 'off'">
|
server_name {{ !data.non_www ? 'www.' : '' }}{{ data.domain }};<span ng-if="data.php !== 'off'">
|
||||||
set $base /var/www/{{ data.domain }};
|
set $base /var/www/{{ data.domain }};
|
||||||
root $base{{ data.document_root }};</span><span ng-if="data.php === 'off'">
|
root $base{{ data.document_root }};</span><span ng-if="data.php === 'off'">
|
||||||
root /var/www/{{ data.domain }}{{ data.document_root }};</span>
|
root /var/www/{{ data.domain }}{{ data.document_root }};</span><span ng-if="(data.php !== 'off' && data.index_php) || data.index_html">
|
||||||
|
|
||||||
|
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'">
|
<span ng-if="data.file_structure === 'separated'">
|
||||||
include _general.conf;<span ng-if="data.php !== 'off' && data.wordpress">
|
include _general.conf;<span ng-if="data.php !== 'off' && data.wordpress">
|
||||||
include _wordpress.conf;</span><span ng-if="data.php !== 'off'">
|
include _wordpress.conf;</span><span ng-if="data.php !== 'off'">
|
||||||
|
|
Loading…
Reference in New Issue