mirror of
https://github.com/digitalocean/nginxconfig.io.git
synced 2025-08-10 10:05:53 +08:00
Logging tab
added support for domain specific acces_log / error_log (fixes #6)
This commit is contained in:
@@ -28,7 +28,7 @@ http {
|
||||
|
||||
# logging
|
||||
access_log {{ isAccessLog() ? data.access_log : 'off' }};
|
||||
error_log {{ data.error_log }} warn;<!--
|
||||
error_log {{ isErrorLog() ? data.error_log : '/dev/null' }};<!--
|
||||
|
||||
✔ limitReq --><span ng-if="data.limit_req">
|
||||
|
||||
|
@@ -21,11 +21,6 @@ server {<!--
|
||||
✘ PHP --><span ng-if="!isPHP()">
|
||||
root /var/www/{{ domain() }}{{ data.document_root }};</span><!--
|
||||
|
||||
✔ index.php --><span ng-if="isIndexPHP()">
|
||||
|
||||
# index.php
|
||||
index index.php;</span><!--
|
||||
|
||||
✔ HTTPS --><span ng-if="isHTTPS()">
|
||||
|
||||
# SSL
|
||||
@@ -35,6 +30,19 @@ server {<!--
|
||||
✔ Let's Encrypt --><span ng-if="isCertLetsEncrypt()">
|
||||
ssl_trusted_certificate /etc/letsencrypt/live/{{ domain() }}/fullchain.pem;</span></span><!--
|
||||
|
||||
✔ access log domain || error log domain --><span ng-if="isAccessLogDomain() || isErrorLogDomain()">
|
||||
|
||||
# logging<!--
|
||||
✔ access log domain --><span ng-if="isAccessLogDomain()">
|
||||
access_log {{ accessLogDomainPath() }};</span><!--
|
||||
✔ error log domain --><span ng-if="isErrorLogDomain()">
|
||||
error_log {{ errorLogDomainPath() }};</span></span><!--
|
||||
|
||||
✔ index.php --><span ng-if="isIndexPHP()">
|
||||
|
||||
# index.php
|
||||
index index.php;</span><!--
|
||||
|
||||
✔ Fallback HTML || ✔ Fallback PHP --><span ng-if="(isFallbackHTML() || isFallbackPHP()) && (!isProxy() || data.proxy_path !== '/')">
|
||||
|
||||
# {{ isFallbackHTML() ? 'index.html' : ( isFallbackPHP() ? 'index.php' : '' ) }} fallback
|
||||
|
Reference in New Issue
Block a user