2018-01-07 15:30:12 +00:00
<!doctype html>
< html lang = "en" >
< head >
2018-02-16 08:09:29 +00:00
< base href = "/" >
2018-01-07 15:30:12 +00:00
< meta charset = "utf-8" >
< meta name = "viewport" content = "width=device-width, initial-scale=1, shrink-to-fit=no" >
2018-07-01 13:07:38 +00:00
< link rel = "stylesheet" href = "assets/css/app.min.css?v=COMMIT_HASH" >
2018-02-18 13:02:11 +00:00
< link rel = "icon" type = "image/png" href = "assets/img/favicon.png" >
2018-01-07 15:30:12 +00:00
< title > nginxconfig.io< / title >
2018-01-21 17:49:04 +00:00
< meta name = "description" content = "Online nginx configuration generator" >
2018-07-26 11:24:00 +00:00
< meta name = "keywords" content = "nginx, config, configurator, /etc/nginx/nginx.conf, nginx performance, nginx tuning, nginx php, nginx, php fpm, wordpress, drupal, Let's Encrypt, custom certificate, cdn, access_log, error_log, Laravel, Lumen, Symfony, Zend, CodeIgniter, Yii, CakePHP, Slim, Angular, React, Vue.js, Ember.js" >
2018-01-21 17:49:04 +00:00
< meta property = "og:title" content = "nginxconfig.io" >
2018-07-26 11:24:00 +00:00
< meta property = "og:description" content = "Online nginx configuration generator: HTTPS, HTTP2, CDN, PHP (Laravel, Symfony, CodeIgniter…), Frontend (Angular, React, Vue.js…), WordPress, Drupal, security headers, rate limiting, expiration by file types…" >
2018-01-21 17:49:04 +00:00
< meta property = "og:type" content = "website" >
< meta property = "og:url" content = "https://nginxconfig.io" >
2018-02-18 13:02:11 +00:00
< meta property = "og:image" content = "https://nginxconfig.io/assets/img/share.png" >
2018-01-07 15:30:12 +00:00
< / head >
2018-01-08 16:14:40 +00:00
< body ng-app = "NginxConfigIoApp" ng-controller = "NginxConfigIoController" >
2018-01-07 15:30:12 +00:00
< header >
2018-01-08 07:53:08 +00:00
< div class = "container" >
2018-02-24 15:05:08 +00:00
< img src = "assets/img/logo-light.svg" class = "logo" alt = "nginxconfig.io" >
2018-01-08 07:53:08 +00:00
< / div >
2018-01-08 16:14:40 +00:00
< / header >
2018-07-01 13:07:38 +00:00
< section class = "presets" >
2018-07-18 17:04:24 +00:00
< button type = "button" class = "btn btn-sm btn-outline-dark" ng-click = "setPreset('frontend')" tooltips tooltip-template = "• disabled PHP<br>• index.html fallback routing" tooltip-side = "bottom" > Frontend < img src = "assets/img/brands/angular.svg" alt = "Angular" > < img src = "assets/img/brands/react.svg" alt = "React" > < img src = "assets/img/brands/vuejs.svg" alt = "Vue.js" > < / button >
< button type = "button" class = "btn btn-sm btn-outline-dark" ng-click = "setPreset('backend')" tooltips tooltip-template = "• enabled PHP<br>• index.php fallback routing" tooltip-side = "bottom" > Backend < img src = "assets/img/brands/php.svg" alt = "PHP" > < img src = "assets/img/brands/laravel.svg" alt = "Laravel" > < img src = "assets/img/brands/symfony.svg" alt = "Symfony" > < img src = "assets/img/brands/codeigniter.svg" alt = "CodeIgniter" > < / button >
2018-07-01 13:07:38 +00:00
< button type = "button" class = "btn btn-sm btn-outline-dark" ng-click = "setPreset('spa')" tooltips tooltip-template = "• enabled PHP<br>• index.html fallback routing<br>• index.php API routing" tooltip-side = "bottom" > Single-page application< / button >
2018-07-26 11:24:00 +00:00
< button type = "button" class = "btn btn-sm btn-outline-dark" ng-click = "setPreset('wordpress')" tooltips tooltip-template = "• enabled PHP<br>• index.php fallback routing<br>• WordPress security rules" tooltip-side = "bottom" > < img src = "assets/img/brands/wordpress.svg" alt = "WordPress" > WordPress< / button >
< button type = "button" class = "btn btn-sm btn-outline-dark" ng-click = "setPreset('drupal')" tooltips tooltip-template = "• enabled PHP<br>• index.php fallback routing<br>• Drupal security rules" tooltip-side = "bottom" > < img src = "assets/img/brands/drupal.svg" alt = "Drupal" > Drupal< / button >
2018-07-01 13:07:38 +00:00
< / section >
< div class = "container-fluid" >
< div class = "row" >
< div class = "col-md-3 col-lg-2" >
< aside class = "options" >
2018-01-07 15:30:12 +00:00
< div class = "card" >
< div class = "card-body" >
< div class = "form-group" >
2018-01-09 08:01:00 +00:00
< label class = "form-label" > Domain< / label >
2018-07-10 19:44:13 +00:00
< input type = "text"
class="form-control form-control-sm domain"
ng-model="data.domain"
ng-class="{ 'input-changed': data.domain !== defaultData.domain }"
placeholder="{{ domain() }}"
autofocus>
2018-01-07 15:30:12 +00:00
< / div >
< div class = "form-group" >
2018-01-23 07:21:09 +00:00
< label class = "form-label" >
< span tooltips tooltip-template = "Define path to project." > Path< / span >
< / label >
2018-07-10 19:44:13 +00:00
< input type = "text"
class="form-control form-control-sm"
ng-model="data.path"
ng-class="{ 'input-changed': data.path !== defaultData.path }"
placeholder="{{ '/var/www/' + domain() }}">
2018-01-07 15:30:12 +00:00
< / div >
< div class = "form-group" >
2018-01-23 07:21:09 +00:00
< label class = "form-label" >
< span tooltips tooltip-template = "Define public path in project path." > Document root< / span >
< / label >
2018-07-10 19:44:13 +00:00
< input type = "text"
class="form-control form-control-sm"
ng-model="data.document_root"
ng-class="{ 'input-changed': data.document_root !== defaultData.document_root }">
2018-01-07 15:30:12 +00:00
< / div >
2018-07-10 19:44:13 +00:00
< div class = "form-check" ng-class = "{ 'input-changed': data.non_www !== defaultData.non_www }" >
2018-02-18 13:02:11 +00:00
< input class = "form-check-input" type = "checkbox" id = "non_www" ng-model = "data.non_www" >
< label class = "form-check-label" for = "non_www" >
< span tooltips tooltip-template = "Serve requests without www subdomain." > non-www< / span >
2018-01-07 15:30:12 +00:00
< / label >
< / div >
2018-03-09 22:38:32 +00:00
< div class = "form-subgroup" ng-cloak >
2018-07-10 19:44:13 +00:00
< div class = "form-check" ng-class = "{ 'input-changed': data.redirect !== defaultData.redirect }" >
2018-03-09 22:38:32 +00:00
< input class = "form-check-input" type = "checkbox" id = "redirect" ng-model = "data.redirect" >
< label class = "form-check-label" for = "redirect" >
< span tooltips tooltip-template = "Redirect {{ isWWW() ? 'non-www version and ' : '' }}all subdomains to domain." > redirect < small > {{ isWWW() ? 'non-www, ' : '' }}subdomains< / small > < / span >
< / label >
< / div >
< / div >
2018-02-24 19:25:07 +00:00
< div class = "form-subgroup" ng-if = "isWWW()" ng-cloak >
2018-07-10 19:44:13 +00:00
< div class = "form-check" ng-class = "{ 'input-changed': data.cdn !== defaultData.cdn }" >
2018-02-18 13:02:11 +00:00
< input class = "form-check-input" type = "checkbox" id = "cdn" ng-model = "data.cdn" >
< label class = "form-check-label" for = "cdn" >
< span tooltips tooltip-template = "Cookie-free CDN subdomain." > CDN < small > subdomain< / small > < / span >
< / label >
< / div >
2018-01-07 21:42:27 +00:00
< / div >
2018-07-10 19:44:13 +00:00
< div class = "form-check" ng-class = "{ 'input-changed': data.https !== defaultData.https }" >
2018-02-18 13:02:11 +00:00
< input class = "form-check-input" type = "checkbox" id = "https" ng-model = "data.https" >
< label class = "form-check-label" for = "https" >
2018-04-21 13:10:10 +00:00
< span tooltips tooltip-template = "Provides support for HTTPS.<br><br><i>using Mozilla SSL config</i>" > < strong > HTTPS< / strong > < / span >
2018-01-07 21:42:27 +00:00
< / label >
< / div >
2018-02-24 19:25:07 +00:00
< div class = "form-subgroup" ng-if = "isHTTPS()" ng-cloak >
2018-07-10 19:44:13 +00:00
< div class = "form-check" ng-class = "{ 'input-changed': data.http2 !== defaultData.http2 }" >
2018-02-18 13:02:11 +00:00
< input class = "form-check-input" type = "checkbox" id = "http2" ng-model = "data.http2" >
< label class = "form-check-label" for = "http2" >
< span tooltips tooltip-template = "Provides support for HTTP/2." > HTTP/2< / span >
< / label >
< / div >
< / div >
2018-03-09 22:27:39 +00:00
< div class = "form-subgroup" ng-if = "isHTTPS()" ng-cloak >
2018-07-10 19:44:13 +00:00
< div class = "form-check" ng-class = "{ 'input-changed': data.force_https !== defaultData.force_https }" >
2018-03-09 22:27:39 +00:00
< input class = "form-check-input" type = "checkbox" id = "force_https" ng-model = "data.force_https" >
< label class = "form-check-label" for = "force_https" >
< span tooltips tooltip-template = "Force redirection from HTTP to HTTPS." > force HTTPS< / span >
< / label >
< / div >
< / div >
2018-07-10 21:08:32 +00:00
< div class = "form-subgroup" ng-if = "isHTTPS()" ng-cloak >
< div class = "form-check" ng-class = "{ 'input-changed': data.hsts !== defaultData.hsts }" >
< input class = "form-check-input" type = "checkbox" id = "hsts" ng-model = "data.hsts" >
< label class = "form-check-label" for = "hsts" >
< span tooltips tooltip-template = "HTTP Strict Transport Security is a web security policy mechanism which helps to protect websites against protocol downgrade attacks and cookie hijacking." > HSTS< / span >
< / label >
< / div >
< / div >
2018-03-09 23:44:47 +00:00
< div class = "form-subgroup pt-2" ng-if = "isHTTPS()" ng-cloak >
2018-07-10 21:08:32 +00:00
< strong > Certification type:< / strong >
2018-03-10 11:42:05 +00:00
< div class = "form-subgroup" >
2018-07-10 19:44:13 +00:00
< div class = "form-check" ng-class = "{ 'input-changed': data.cert_type !== defaultData.cert_type && data.cert_type === 'letsencrypt' }" >
2018-03-10 11:42:05 +00:00
< input class = "form-check-input" type = "radio" id = "letsencrypt" ng-model = "data.cert_type" value = "letsencrypt" >
< label class = "form-check-label" for = "letsencrypt" >
< span tooltips tooltip-template = "Let's Encrypt based SSl.<br><br><i>free, automated, and open Certificate Authority</i>" > Let's Encrypt< / span >
< / label >
< / div >
< div class = "form-group" ng-if = "isHTTPS() && isCertLetsEncrypt()" >
< label class = "form-label small" >
< span tooltips tooltip-template = "Let's Encrypt expiration notify e-mail." > E-mail< / span >
< / label >
2018-07-10 19:44:13 +00:00
< input type = "text"
class="form-control form-control-sm"
ng-model="data.email"
ng-class="{ 'input-changed': data.email !== defaultData.email }"
placeholder="{{ 'hello@' + domain() }}">
2018-03-10 11:42:05 +00:00
< / div >
2018-07-10 19:44:13 +00:00
< div class = "form-check" ng-class = "{ 'input-changed': data.cert_type !== defaultData.cert_type && data.cert_type === 'custom' }" >
2018-03-10 11:42:05 +00:00
< input class = "form-check-input" type = "radio" id = "custom_cert" ng-model = "data.cert_type" value = "custom" >
< label class = "form-check-label" for = "custom_cert" >
< span tooltips tooltip-template = "Custom certificate" > Custom certificate< / span >
< / label >
< / div >
< div class = "form-group" ng-if = "isHTTPS() && isCertCustom()" >
< label class = "form-label small" >
< span tooltips tooltip-template = "Path to crt file" > < code > ssl_certificate< / code > < / span >
< / label >
2018-07-10 19:44:13 +00:00
< input type = "text"
class="form-control form-control-sm"
ng-model="data.ssl_certificate"
ng-class="{ 'input-changed': data.ssl_certificate !== defaultData.ssl_certificate }"
placeholder="{{ '/etc/nginx/ssl/' + domain() + '.crt' }}">
2018-03-10 11:42:05 +00:00
< / div >
< div class = "form-group" ng-if = "isHTTPS() && isCertCustom()" >
< label class = "form-label small" >
< span tooltips tooltip-template = "Path to key file" > < code > ssl_certificate_key< / code > < / span >
< / label >
2018-07-10 19:44:13 +00:00
< input type = "text"
class="form-control form-control-sm"
ng-model="data.ssl_certificate_key"
ng-class="{ 'input-changed': data.ssl_certificate_key !== defaultData.ssl_certificate_key }"
placeholder="{{ '/etc/nginx/ssl/' + domain() + '.key' }}">
2018-03-10 11:42:05 +00:00
< / div >
2018-02-27 07:36:39 +00:00
< / div >
< / div >
2018-03-10 12:39:05 +00:00
< div class = "form-subgroup pt-2" ng-if = "isHTTPS()" ng-cloak >
2018-07-10 21:08:32 +00:00
< strong > SSL profile:< / strong >
2018-03-10 12:39:05 +00:00
< div class = "form-subgroup" >
2018-07-10 19:44:13 +00:00
< div class = "form-check" ng-class = "{ 'input-changed': data.ssl_profile !== defaultData.ssl_profile && data.ssl_profile === 'modern' }" >
2018-03-10 12:39:05 +00:00
< input class = "form-check-input" type = "radio" id = "modern" ng-model = "data.ssl_profile" value = "modern" >
< label class = "form-check-label" for = "modern" >
< span tooltips tooltip-template = "Oldest compatible clients: Firefox 27, Chrome 30, IE 11 on Windows 7, Edge, Opera 17, Safari 9, Android 5.0, and Java 8" > modern< / span >
< / label >
< / div >
2018-07-10 19:44:13 +00:00
< div class = "form-check" ng-class = "{ 'input-changed': data.ssl_profile !== defaultData.ssl_profile && data.ssl_profile === 'intermediate' }" >
2018-03-10 12:39:05 +00:00
< input class = "form-check-input" type = "radio" id = "intermediate" ng-model = "data.ssl_profile" value = "intermediate" >
< label class = "form-check-label" for = "intermediate" >
< span tooltips tooltip-template = "Oldest compatible clients: Firefox 1, Chrome 1, IE 7, Opera 5, Safari 1, Windows XP IE8, Android 2.3, Java 7" > intermediate< / span >
< / label >
< / div >
2018-07-10 19:44:13 +00:00
< div class = "form-check" ng-class = "{ 'input-changed': data.ssl_profile !== defaultData.ssl_profile && data.ssl_profile === 'old' }" >
2018-03-10 12:39:05 +00:00
< input class = "form-check-input" type = "radio" id = "old" ng-model = "data.ssl_profile" value = "old" >
< label class = "form-check-label" for = "old" >
< span tooltips tooltip-template = "Oldest compatible clients: Windows XP IE6, Java 6" > old< / span >
< / label >
< / div >
< / div >
< / div >
2018-02-27 07:36:39 +00:00
< div class = "mt-2" >
< div class = "form-group" >
< div class = "input-group input-group-sm" >
< div class = "input-group-prepend" >
< div class = "input-group-text" > IPv4< / div >
< / div >
2018-07-10 19:44:13 +00:00
< input type = "text"
class="form-control form-control-sm"
ng-model="data.ipv4"
ng-class="{ 'input-changed': data.ipv4 !== defaultData.ipv4 }">
2018-02-18 13:02:11 +00:00
< / div >
< / div >
2018-02-27 07:36:39 +00:00
< div class = "form-group" >
< div class = "input-group input-group-sm" >
< div class = "input-group-prepend" >
< div class = "input-group-text" > IPv6< / div >
< / div >
2018-07-10 19:44:13 +00:00
< input type = "text"
class="form-control form-control-sm"
ng-model="data.ipv6"
ng-class="{ 'input-changed': data.ipv6 !== defaultData.ipv6 }">
2018-02-18 13:02:11 +00:00
< / div >
< / div >
2018-01-07 15:30:12 +00:00
< / div >
2018-02-23 00:40:17 +00:00
< / div >
< / div >
< div class = "card" >
< div class = "card-body" >
2018-04-21 13:47:37 +00:00
< label class = "form-label" > File structure< / label >
< div class = "form-subgroup" >
2018-07-10 19:44:13 +00:00
< div class = "form-check" ng-class = "{ 'input-changed': data.file_structure !== defaultData.file_structure && data.file_structure === 'unified' }" >
2018-04-21 13:47:37 +00:00
< input class = "form-check-input" type = "radio" id = "unified" ng-model = "data.file_structure" value = "unified" >
< label class = "form-check-label" for = "unified" >
< span tooltips tooltip-template = "Combine configuration to a single file.<br><br><i>(if possible)</i>" > unified< / span >
< / label >
< / div >
2018-02-24 23:01:49 +00:00
< / div >
2018-04-21 13:47:37 +00:00
< div class = "form-subgroup" >
2018-07-10 19:44:13 +00:00
< div class = "form-check" ng-class = "{ 'input-changed': data.file_structure !== defaultData.file_structure && data.file_structure === 'modularized' }" >
2018-04-21 13:47:37 +00:00
< input class = "form-check-input" type = "radio" id = "modularized" ng-model = "data.file_structure" value = "modularized" >
< label class = "form-check-label" for = "modularized" >
< span tooltips tooltip-template = "Multiple configuration files<br><br><i>(ideal for multi-domain environment)</i>" > modularized< / span >
< / label >
< / div >
2018-01-07 23:02:48 +00:00
< / div >
2018-04-21 13:47:37 +00:00
< / div >
< / div >
< div class = "card" >
< div class = "card-body" >
2018-02-23 00:40:17 +00:00
< div class = "form-group" >
2018-02-27 07:36:39 +00:00
< div class = "input-group input-group-sm" tooltips tooltip-template = "PHP-FPM via TCP or unix socket." >
2018-02-23 00:40:17 +00:00
< div class = "input-group-prepend" >
< div class = "input-group-text" > PHP< / div >
< / div >
2018-07-10 19:44:13 +00:00
< select class = "custom-select" ng-model = "data.php" ng-class = "{ 'input-changed': data.php !== defaultData.php }" >
2018-02-23 00:40:17 +00:00
< option value = "off" > disabled< / option >
< option value = "tcp" > TCP< / option >
< option value = "5.x" > 5.x socket< / option >
< option value = "7.0" > 7.0 socket< / option >
< option value = "7.1" > 7.1 socket< / option >
< option value = "7.2" > 7.2 socket< / option >
< option value = "7.3" > 7.3 socket< / option >
< / select >
< / div >
< / div >
2018-02-24 19:25:07 +00:00
< div class = "form-subgroup" ng-if = "isPHP()" ng-cloak >
2018-07-10 19:44:13 +00:00
< div class = "form-check" ng-class = "{ 'input-changed': data.wordpress !== defaultData.wordpress }" >
2018-02-23 00:40:17 +00:00
< input class = "form-check-input" type = "checkbox" id = "wordpress" ng-model = "data.wordpress" >
< label class = "form-check-label" for = "wordpress" >
2018-07-26 11:24:00 +00:00
< span tooltips tooltip-template = "WordPress security rules and login limiting <i>(if enabled)</i>." > WordPress rules< / span >
< / label >
< / div >
< / div >
< div class = "form-subgroup" ng-if = "isPHP()" ng-cloak >
< div class = "form-check" ng-class = "{ 'input-changed': data.drupal !== defaultData.drupal }" >
< input class = "form-check-input" type = "checkbox" id = "drupal" ng-model = "data.drupal" >
< label class = "form-check-label" for = "drupal" >
< span tooltips tooltip-template = "Drupal security rules and login limiting <i>(if enabled)</i>." > Drupal rules< / span >
2018-02-23 00:40:17 +00:00
< / label >
< / div >
< / div >
2018-01-07 15:30:12 +00:00
< / div >
< / div >
< div class = "card" >
< div class = "card-body" >
2018-06-11 22:41:57 +00:00
< label class = "form-label" > < code tooltips tooltip-template = "Defines the file that will be used as an index." > index< / code > < / label >
2018-02-23 00:40:17 +00:00
< div class = "form-subgroup" >
2018-07-10 19:44:13 +00:00
< div class = "form-check" ng-class = "{ 'input-changed': data.index !== defaultData.index && data.index === 'index.html' }" >
2018-04-21 13:47:37 +00:00
< input class = "form-check-input" type = "radio" id = "index.html" ng-model = "data.index" value = "index.html" >
< label class = "form-check-label" for = "index.html" > index.html< / label >
2018-02-23 00:40:17 +00:00
< / div >
2018-01-07 15:30:12 +00:00
< / div >
2018-07-26 11:24:00 +00:00
< div class = "form-subgroup" ng-if = "isPHP()" ng-cloak >
2018-07-10 19:44:13 +00:00
< div class = "form-check" ng-class = "{ 'input-changed': data.index !== defaultData.index && data.index === 'index.php' }" >
2018-04-21 13:47:37 +00:00
< input class = "form-check-input" type = "radio" id = "index.php" ng-model = "data.index" value = "index.php" >
< label class = "form-check-label" for = "index.php" > index.php< / label >
2018-02-23 00:40:17 +00:00
< / div >
2018-01-07 15:30:12 +00:00
< / div >
2018-06-11 22:41:57 +00:00
< label class = "form-label mt-3" > < span tooltips tooltip-template = "Configures fallback routing of unhandled requests." > fallback routing< / span > < / label >
< div class = "form-subgroup" >
2018-07-10 19:44:13 +00:00
< div class = "form-check" ng-class = "{ 'input-changed': data.fallback_html !== defaultData.fallback_html }" >
2018-06-11 22:41:57 +00:00
< input class = "form-check-input" type = "checkbox" id = "fallback_html" ng-model = "data.fallback_html" >
< label class = "form-check-label" for = "fallback_html" > index.html< / label >
< / div >
2018-07-26 11:24:00 +00:00
< div class = "form-check" ng-if = "isPHP()" ng-class = "{ 'input-changed': data.fallback_php !== defaultData.fallback_php }" ng-cloak >
2018-06-11 22:41:57 +00:00
< input class = "form-check-input" type = "checkbox" id = "fallback_php" ng-model = "data.fallback_php" >
< label class = "form-check-label" for = "fallback_php" > index.php< / label >
< / div >
2018-07-26 11:24:00 +00:00
< div class = "form-subgroup" ng-if = "isFallbackHTML() && isFallbackPHP()" ng-cloak >
2018-06-11 22:41:57 +00:00
< div class = "form-group pl-1" >
2018-07-26 11:24:00 +00:00
< input type = "text"
class="form-control form-control-sm"
ng-model="data.fallback_php_path"
ng-class="{ 'input-changed': data.fallback_php_path !== defaultData.fallback_php_path }">
2018-06-11 22:41:57 +00:00
< / div >
< / div >
2018-04-21 13:47:37 +00:00
< / div >
2018-01-07 15:30:12 +00:00
< / div >
< / div >
< div class = "card" >
< div class = "card-body" >
2018-02-23 00:40:17 +00:00
< div class = "form-group" >
< label class = "form-label" > < code tooltips tooltip-template = "Referrer Policy is a new header that allows a site to control how much information the browser includes with navigations away from a document and should be set by all sites." > Referrer-Policy< / code > < / label >
2018-07-10 19:44:13 +00:00
< select class = "custom-select form-control-sm" ng-model = "data.referrer_policy" ng-class = "{ 'input-changed': data.referrer_policy !== defaultData.referrer_policy }" >
2018-02-23 00:40:17 +00:00
< option value = "no-referrer" > no-referrer< / option >
< option value = "no-referrer-when-downgrade" > no-referrer-when-downgrade< / option >
< option value = "origin" > origin< / option >
< option value = "origin-when-cross-origin" > origin-when-cross-origin< / option >
< option value = "same-origin" > same-origin< / option >
< option value = "strict-origin" > strict-origin< / option >
< option value = "strict-origin-when-cross-origin" > strict-origin-when-cross-origin< / option >
< option value = "unsafe-url" > unsafe-url< / option >
< / select >
2018-01-07 15:30:12 +00:00
< / div >
2018-02-23 00:40:17 +00:00
< div class = "form-group" >
< label class = "form-label" > < code tooltips tooltip-template = "Content Security Policy is an effective measure to protect your site from XSS attacks. By whitelisting sources of approved content, you can prevent the browser from loading malicious assets." > Content-Security-Policy< / code > < / label >
2018-07-10 19:44:13 +00:00
< input type = "text" class = "form-control form-control-sm" ng-model = "data.content_security_policy" ng-class = "{ 'input-changed': data.content_security_policy !== defaultData.content_security_policy }" >
2018-01-07 15:30:12 +00:00
< / div >
< / div >
< / div >
< div class = "card" >
< div class = "card-body" >
< div class = "form-group" >
2018-01-23 07:21:09 +00:00
< label class = "form-label" > < code tooltips tooltip-template = "Sets the maximum number of simultaneous connections that can be opened by a worker process." > worker_processes< / code > < / label >
2018-07-10 19:44:13 +00:00
< select class = "custom-select form-control-sm" ng-model = "data.worker_processes" ng-class = "{ 'input-changed': data.worker_processes !== defaultData.worker_processes }" >
2018-01-07 15:30:12 +00:00
< option value = "auto" > auto< / option >
< option value = "1" > 1< / option >
< option value = "2" > 2< / option >
< option value = "3" > 3< / option >
< option value = "4" > 4< / option >
< option value = "5" > 5< / option >
< option value = "6" > 6< / option >
< option value = "7" > 7< / option >
< option value = "8" > 8< / option >
< option value = "9" > 9< / option >
< option value = "10" > 10< / option >
< option value = "11" > 11< / option >
< option value = "12" > 12< / option >
< option value = "13" > 13< / option >
< option value = "14" > 14< / option >
< option value = "15" > 15< / option >
< option value = "16" > 16< / option >
< / select >
< / div >
< div class = "form-group" >
2018-01-23 07:21:09 +00:00
< label class = "form-label" > < code tooltips tooltip-template = "Defines user and group credentials used by worker processes.<br>If group is omitted, a group whose name equals that of user is used." > user< / code > < / label >
2018-07-10 19:44:13 +00:00
< input type = "text" class = "form-control form-control-sm" ng-model = "data.user" ng-class = "{ 'input-changed': data.user !== defaultData.user }" >
2018-01-07 15:30:12 +00:00
< / div >
< div class = "form-group" >
2018-01-23 07:21:09 +00:00
< label class = "form-label" > < code tooltips tooltip-template = "Defines a file that will store the process ID of the main process." > pid< / code > < / label >
2018-07-10 19:44:13 +00:00
< input type = "text" class = "form-control form-control-sm" ng-model = "data.pid" ng-class = "{ 'input-changed': data.pid !== defaultData.pid }" >
2018-01-07 15:30:12 +00:00
< / div >
< div class = "form-group" >
2018-01-23 07:21:09 +00:00
< label class = "form-label" > < code tooltips tooltip-template = "Sets the path, format, and configuration for a buffered log write." > access_log< / code > < / label >
2018-07-10 19:44:13 +00:00
< input type = "text" class = "form-control form-control-sm" ng-model = "data.access_log" ng-class = "{ 'input-changed': data.access_log !== defaultData.access_log }" >
2018-01-07 15:30:12 +00:00
< / div >
< div class = "form-group" >
2018-01-23 07:21:09 +00:00
< label class = "form-label" > < code tooltips tooltip-template = "Configures logging path (with warn level)." > error_log< / code > < / label >
2018-07-10 19:44:13 +00:00
< input type = "text" class = "form-control form-control-sm" ng-model = "data.error_log" ng-class = "{ 'input-changed': data.error_log !== defaultData.error_log }" >
2018-01-07 15:30:12 +00:00
< / div >
2018-01-23 05:41:31 +00:00
< div class = "form-group" >
2018-01-23 07:21:09 +00:00
< label class = "form-label" > < code tooltips tooltip-template = "Sets the maximum allowed size of the client request body." > client_max_body_size< / code > < / label >
2018-01-23 05:41:31 +00:00
< div class = "input-group" >
2018-07-10 19:44:13 +00:00
< input type = "number" min = "0" step = "1" class = "form-control form-control-sm" ng-model = "data.client_max_body_size" ng-class = "{ 'input-changed': data.client_max_body_size !== defaultData.client_max_body_size }" >
2018-01-23 05:41:31 +00:00
< div class = "input-group-append" >
< div class = "input-group-text" > MB< / div >
< / div >
< / div >
< / div >
2018-07-10 19:44:13 +00:00
< div class = "form-check" ng-class = "{ 'input-changed': data.gzip !== defaultData.gzip }" >
2018-01-07 15:30:12 +00:00
< input class = "form-check-input" type = "checkbox" id = "gzip" ng-model = "data.gzip" >
< label class = "form-check-label" for = "gzip" >
2018-01-23 07:21:09 +00:00
< code tooltips tooltip-template = "Gzipping of responses." > gzip< / code >
2018-01-07 15:30:12 +00:00
< / label >
< / div >
2018-07-10 19:44:13 +00:00
< div class = "form-check" ng-class = "{ 'input-changed': data.server_tokens !== defaultData.server_tokens }" >
2018-01-07 15:30:12 +00:00
< input class = "form-check-input" type = "checkbox" id = "server_tokens" ng-model = "data.server_tokens" >
< label class = "form-check-label" for = "server_tokens" >
2018-01-23 07:21:09 +00:00
< code tooltips tooltip-template = "Emitting nginx version on error pages and in the “Server” response header field." > server_tokens< / code >
2018-01-07 15:30:12 +00:00
< / label >
< / div >
2018-07-10 19:44:13 +00:00
< div class = "form-check" ng-class = "{ 'input-changed': data.log_not_found !== defaultData.log_not_found }" >
2018-01-07 15:30:12 +00:00
< input class = "form-check-input" type = "checkbox" id = "log_not_found" ng-model = "data.log_not_found" >
< label class = "form-check-label" for = "log_not_found" >
2018-01-23 07:21:09 +00:00
< code tooltips tooltip-template = "Logging of errors about not found files into error_log." > log_not_found< / code >
2018-01-07 15:30:12 +00:00
< / label >
< / div >
2018-07-10 19:44:13 +00:00
< div class = "form-check" ng-class = "{ 'input-changed': data.limit_req !== defaultData.limit_req }" >
2018-01-07 15:30:12 +00:00
< input class = "form-check-input" type = "checkbox" id = "limit_req" ng-model = "data.limit_req" >
< label class = "form-check-label" for = "limit_req" >
2018-01-23 07:21:09 +00:00
< span tooltips tooltip-template = "Used to limit the request processing rate per a defined key, in particular, the processing rate of requests coming from a single IP address." > < code > limit_req< / code > < / span >
2018-01-07 15:30:12 +00:00
< / label >
< / div >
< / div >
< / div >
< div class = "card" >
< div class = "card-body" >
2018-04-21 13:22:15 +00:00
< label class = "form-label" > < span tooltips tooltip-template = "Adding or modifying the “Expires” and “Cache-Control” response header fields provided that the response code equals 200, 201, 204, 206, 301, 302, 303, 304, 307, or 308." > < code > expires< / code > < / span > < / label >
2018-02-25 16:33:07 +00:00
< div class = "row no-gutters" >
< div class = "col-md-6" >
< div class = "form-group" >
< label class = "form-label" > < span tooltips tooltip-template = "{{ extensions.assets }}" > assets< / span > < / label >
2018-07-10 19:44:13 +00:00
< input type = "text" class = "form-control form-control-sm" ng-model = "data.expires_assets" ng-class = "{ 'input-changed': data.expires_assets !== defaultData.expires_assets }" >
2018-02-25 16:33:07 +00:00
< / div >
< / div >
< div class = "col-md-6" >
< div class = "form-group" >
< label class = "form-label" > < span tooltips tooltip-template = "{{ extensions.images }}|{{ extensions.audio }}|{{ extensions.video }}" > media< / span > < / label >
2018-07-10 19:44:13 +00:00
< input type = "text" class = "form-control form-control-sm" ng-model = "data.expires_media" ng-class = "{ 'input-changed': data.expires_media !== defaultData.expires_media }" >
2018-02-25 16:33:07 +00:00
< / div >
2018-02-18 13:02:11 +00:00
< / div >
< / div >
2018-02-25 16:33:07 +00:00
< div class = "row no-gutters" >
< div class = "col-md-6" >
< div class = "form-group" >
< label class = "form-label" > < span tooltips tooltip-template = "{{ extensions.svg }}" > svg< / span > < / label >
2018-07-10 19:44:13 +00:00
< input type = "text" class = "form-control form-control-sm" ng-model = "data.expires_svg" ng-class = "{ 'input-changed': data.expires_svg !== defaultData.expires_svg }" >
2018-02-25 16:33:07 +00:00
< / div >
< / div >
< div class = "col-md-6" >
< div class = "form-group" >
< label class = "form-label" > < span tooltips tooltip-template = "{{ extensions.fonts }}" > fonts< / span > < / label >
2018-07-10 19:44:13 +00:00
< input type = "text" class = "form-control form-control-sm" ng-model = "data.expires_fonts" ng-class = "{ 'input-changed': data.expires_fonts !== defaultData.expires_fonts }" >
2018-02-25 16:33:07 +00:00
< / div >
< / div >
2018-02-18 13:02:11 +00:00
< / div >
< / div >
< / div >
2018-07-01 13:07:38 +00:00
< / aside >
< / div >
< div class = "col-md-6 col-lg-7 files" >
< main >
2018-02-18 13:02:11 +00:00
< div class = "row grid" >
< div class = "grid-sizer col-xl-6" > < / div >
2018-06-11 22:41:57 +00:00
< div ng-if = "(isHTTPS() && (isCertLetsEncrypt() || !isSSLProfileModern()))" class = "grid-item col-xl-12" ng-cloak >
2018-01-20 20:49:36 +00:00
< div class = "commands" >
2018-02-24 15:05:40 +00:00
< pre > < code class = "hljs bash" ng-include = "'templates/commands.html?v=COMMIT_HASH'" > < / code > < / pre >
2018-01-20 20:49:36 +00:00
< / div >
< / div >
2018-07-01 13:07:38 +00:00
< section class = "file grid-item" ng-class = "isModularized() || isWordPress() ? 'col-xl-6' : 'col-xl-12'" ng-cloak >
2018-01-07 15:30:12 +00:00
< strong > /etc/nginx/nginx.conf< / strong >
2018-01-09 07:27:26 +00:00
< button class = "btn btn-light btn-clipboard" ngclipboard data-clipboard-target = "#file-nginx" ngclipboard-success = "clipboardSuccess('nginx.conf')" >
2018-02-18 13:02:11 +00:00
< img src = "assets/img/clipboard-dark.svg" alt = "Copy to clipboard" >
2018-01-07 23:59:21 +00:00
< / button >
2018-01-20 21:01:08 +00:00
< span class = "clipboard-success" ng-if = "clipboardCopy === 'nginx.conf'" > Copied!< / span >
2018-02-25 18:45:02 +00:00
< div class = "code source" data-filename = "nginx.conf" >
2018-02-24 15:05:40 +00:00
< pre > < code class = "nginx" ng-include = "'templates/conf/nginx.conf.html?v=COMMIT_HASH'" onload = "refreshHighlighting()" > < / code > < / pre >
2018-01-07 23:59:21 +00:00
< / div > < div id = "file-nginx" class = "code highlighted" > < / div >
2018-07-01 13:07:38 +00:00
< / section >
< section class = "col-xl-6 grid-item file" ng-if = "isModularized()" ng-cloak >
2018-02-18 13:02:11 +00:00
< strong > /etc/nginx/sites-enabled/{{ domain() }}.conf< / strong >
2018-01-09 07:27:26 +00:00
< button class = "btn btn-light btn-clipboard" ngclipboard data-clipboard-target = "#file-domain" ngclipboard-success = "clipboardSuccess('example.com')" >
2018-02-18 13:02:11 +00:00
< img src = "assets/img/clipboard-dark.svg" alt = "Copy to clipboard" >
2018-01-07 23:59:21 +00:00
< / button >
2018-01-20 21:01:08 +00:00
< span class = "clipboard-success" ng-if = "clipboardCopy === 'example.com'" > Copied!< / span >
2018-02-25 18:45:02 +00:00
< div class = "code source" data-filename = "sites-enabled/{{ domain() }}.conf" >
2018-02-24 15:05:40 +00:00
< pre > < code class = "nginx" ng-include = "'templates/conf/example.com.conf.html?v=COMMIT_HASH?v=COMMIT_HASH'" onload = "refreshHighlighting()" > < / code > < / pre >
2018-01-07 23:59:21 +00:00
< / div > < div id = "file-domain" class = "code highlighted" > < / div >
2018-07-01 13:07:38 +00:00
< / section >
< section class = "col-xl-6 grid-item file" ng-if = "isModularized() && isCertLetsEncrypt()" ng-cloak >
2018-01-07 15:30:12 +00:00
< strong > /etc/nginx/_letsencrypt.conf< / strong >
2018-01-09 07:27:26 +00:00
< button class = "btn btn-light btn-clipboard" ngclipboard data-clipboard-target = "#file-letsencrypt" ngclipboard-success = "clipboardSuccess('_letsencrypt.conf')" >
2018-02-18 13:02:11 +00:00
< img src = "assets/img/clipboard-dark.svg" alt = "Copy to clipboard" >
2018-01-07 23:59:21 +00:00
< / button >
2018-01-20 21:01:08 +00:00
< span class = "clipboard-success" ng-if = "clipboardCopy === '_letsencrypt.conf'" > Copied!< / span >
2018-02-25 18:45:02 +00:00
< div class = "code source" data-filename = "_letsencrypt.conf" >
2018-02-24 15:05:40 +00:00
< pre > < code class = "nginx" ng-include = "'templates/conf/_letsencrypt.conf.html?v=COMMIT_HASH'" onload = "refreshHighlighting()" > < / code > < / pre >
2018-01-07 23:59:21 +00:00
< / div > < div id = "file-letsencrypt" class = "code highlighted" > < / div >
2018-07-01 13:07:38 +00:00
< / section >
< section class = "col-xl-6 grid-item file" ng-if = "isModularized()" ng-cloak >
2018-01-07 15:30:12 +00:00
< strong > /etc/nginx/_general.conf< / strong >
2018-01-09 07:27:26 +00:00
< button class = "btn btn-light btn-clipboard" ngclipboard data-clipboard-target = "#file-general" ngclipboard-success = "clipboardSuccess('_general.conf')" >
2018-02-18 13:02:11 +00:00
< img src = "assets/img/clipboard-dark.svg" alt = "Copy to clipboard" >
2018-01-07 23:59:21 +00:00
< / button >
2018-01-20 21:01:08 +00:00
< span class = "clipboard-success" ng-if = "clipboardCopy === '_general.conf'" > Copied!< / span >
2018-02-25 18:45:02 +00:00
< div class = "code source" data-filename = "_general.conf" >
2018-02-24 15:05:40 +00:00
< pre > < code class = "nginx" ng-include = "'templates/conf/_general.conf.html?v=COMMIT_HASH'" onload = "refreshHighlighting()" > < / code > < / pre >
2018-01-07 23:59:21 +00:00
< / div > < div id = "file-general" class = "code highlighted" > < / div >
2018-07-01 13:07:38 +00:00
< / section >
< section class = "col-xl-6 grid-item file" ng-if = "isPHP() && (isModularized() || isWordPress())" ng-cloak >
2018-01-07 15:30:12 +00:00
< strong > /etc/nginx/_php_fastcgi.conf< / strong >
2018-01-09 07:27:26 +00:00
< button class = "btn btn-light btn-clipboard" ngclipboard data-clipboard-target = "#file-php_fastcgi" ngclipboard-success = "clipboardSuccess('_php_fastcgi.conf')" >
2018-02-18 13:02:11 +00:00
< img src = "assets/img/clipboard-dark.svg" alt = "Copy to clipboard" >
2018-01-07 23:59:21 +00:00
< / button >
2018-01-20 21:01:08 +00:00
< span class = "clipboard-success" ng-if = "clipboardCopy === '_php_fastcgi.conf'" > Copied!< / span >
2018-02-25 18:45:02 +00:00
< div class = "code source" data-filename = "_php_fastcgi.conf" >
2018-02-24 15:05:40 +00:00
< pre > < code class = "nginx" ng-include = "'templates/conf/_php_fastcgi.conf.html?v=COMMIT_HASH'" onload = "refreshHighlighting()" > < / code > < / pre >
2018-01-07 23:59:21 +00:00
< / div > < div id = "file-php_fastcgi" class = "code highlighted" > < / div >
2018-07-01 13:07:38 +00:00
< / section >
< section class = "col-xl-6 grid-item file" ng-if = "isWordPress() && isModularized()" ng-cloak >
2018-01-07 15:30:12 +00:00
< strong > /etc/nginx/_wordpress.conf< / strong >
2018-01-09 07:27:26 +00:00
< button class = "btn btn-light btn-clipboard" ngclipboard data-clipboard-target = "#file-wordpress" ngclipboard-success = "clipboardSuccess('_wordpress.conf')" >
2018-02-18 13:02:11 +00:00
< img src = "assets/img/clipboard-dark.svg" alt = "Copy to clipboard" >
2018-01-07 23:59:21 +00:00
< / button >
2018-01-20 21:01:08 +00:00
< span class = "clipboard-success" ng-if = "clipboardCopy === '_wordpress.conf'" > Copied!< / span >
2018-02-25 18:45:02 +00:00
< div class = "code source" data-filename = "_wordpress.conf" >
2018-02-24 15:05:40 +00:00
< pre > < code class = "nginx" ng-include = "'templates/conf/_wordpress.conf.html?v=COMMIT_HASH'" onload = "refreshHighlighting()" > < / code > < / pre >
2018-01-07 23:59:21 +00:00
< / div > < div id = "file-wordpress" class = "code highlighted" > < / div >
2018-07-01 13:07:38 +00:00
< / section >
2018-07-26 11:24:00 +00:00
< section class = "col-xl-6 grid-item file" ng-if = "isDrupal() && isModularized()" ng-cloak >
< strong > /etc/nginx/_drupal.conf< / strong >
< button class = "btn btn-light btn-clipboard" ngclipboard data-clipboard-target = "#file-drupal" ngclipboard-success = "clipboardSuccess('_drupal.conf')" >
< img src = "assets/img/clipboard-dark.svg" alt = "Copy to clipboard" >
< / button >
< span class = "clipboard-success" ng-if = "clipboardCopy === '_drupal.conf'" > Copied!< / span >
< div class = "code source" data-filename = "_drupal.conf" >
< pre > < code class = "nginx" ng-include = "'templates/conf/_drupal.conf.html?v=COMMIT_HASH'" onload = "refreshHighlighting()" > < / code > < / pre >
< / div > < div id = "file-drupal" class = "code highlighted" > < / div >
< / section >
2018-01-07 15:30:12 +00:00
< / div >
2018-07-01 13:07:38 +00:00
< / main >
< / div >
< div class = "col-md-3 sidebar" >
< aside class = "sidebar" >
2018-01-22 21:12:46 +00:00
< iframe class = "github-star" src = "https://ghbtns.com/github-btn.html?user=valentinxxx&repo=nginxconfig.io&type=star&count=true&size=large" > < / iframe >
2018-04-21 14:03:19 +00:00
< div class = "github-link" >
2018-07-18 17:04:24 +00:00
< img src = "assets/img/brands/github.svg" alt = "GitHub" > < a href = "https://github.com/valentinxxx/nginxconfig.io" target = "_blank" > < small > valentinxxx /< / small > < strong > nginxconfig.io< / strong > < / a >
2018-04-21 14:03:19 +00:00
< / div >
2018-01-07 15:30:12 +00:00
< div class = "adsbygoogle-container" >
2018-02-18 13:02:11 +00:00
< div class = "note" > ▾ advertisement ▾< / div >
2018-01-07 15:30:12 +00:00
< ins class = "adsbygoogle"
2018-07-17 20:58:00 +00:00
style="display:block"
data-ad-client="ca-pub-6543577519725877"
data-ad-slot="2065709573"
data-ad-format="auto"
data-full-width-responsive="true">< / ins >
2018-01-07 15:30:12 +00:00
< script >
2018-07-17 20:58:00 +00:00
(adsbygoogle = window.adsbygoogle || []).push({});
2018-01-07 15:30:12 +00:00
< / script >
< / div >
2018-04-21 13:09:23 +00:00
< div class = "buttons" >
< button class = "btn btn-primary btn-download" ng-click = "downloadZip()" > < img src = "assets/img/download.svg" alt = "Download" > Download ZIP< / button > < br >
< button class = "btn btn-sm btn-danger btn-reset" ng-click = "reset()" > < img src = "assets/img/refresh.svg" alt = "Reset" > Reset< / button >
< / div >
2018-07-01 13:07:38 +00:00
< / aside >
2018-01-07 15:30:12 +00:00
< / div >
< / div >
2018-07-01 13:07:38 +00:00
< / div >
2018-01-07 15:30:12 +00:00
< footer >
< div class = "container-fluid" >
2018-02-25 18:45:02 +00:00
Lovingly made at < img src = "assets/img/balaton.svg" alt = "Lake Balaton" class = "balaton" > < a href = "https://en.wikipedia.org/wiki/Lake_Balaton" target = "_blank" > Lake Balaton, Hungary< / a >
2018-01-07 15:30:12 +00:00
< / div >
< / footer >
< script async src = "https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js" > < / script >
< script async src = "https://www.googletagmanager.com/gtag/js?id=UA-3084378-31" > < / script >
< script >
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-3084378-31');
< / script >
2018-02-18 13:02:11 +00:00
< script src = "assets/js/highlight.min.js?v=9.12.0" > < / script >
< script src = "assets/js/clipboard.min.js?v=1.7.1" > < / script >
< script src = "assets/js/angular.min.js?v=1.6.8" > < / script >
< script src = "assets/js/ngclipboard.min.js?v=1.1.3" > < / script >
< script src = "assets/js/angular-tooltips.min.js?v=1.2.2" > < / script >
< script src = "assets/js/masonry.pkgd.min.js?v=4.2.1" > < / script >
2018-02-25 18:45:02 +00:00
< script src = "assets/js/jszip.min.js?v=3.1.5" > < / script >
< script src = "assets/js/filesaver.min.js?v=1.3.4" > < / script >
2018-02-18 13:02:11 +00:00
< script src = "assets/js/app.js?v=COMMIT_HASH" > < / script >
2018-01-07 15:30:12 +00:00
< / body >
< / html >