|
|
<!doctype html>
|
|
|
<html lang="en">
|
|
|
<head>
|
|
|
<base href="/">
|
|
|
<meta charset="utf-8">
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
|
|
<link rel="stylesheet" href="assets/css/app.min.css?v=COMMIT_HASH">
|
|
|
<link rel="icon" type="image/png" href="assets/img/favicon.png">
|
|
|
<title>nginxconfig.io</title>
|
|
|
<meta name="description" content="Online nginx configuration generator">
|
|
|
<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, reverse proxy, Node.js">
|
|
|
<meta property="og:title" content="nginxconfig.io">
|
|
|
<meta property="og:description" content="Online nginx configuration generator: HTTPS, HTTP2, CDN, PHP (Laravel, Symfony, CodeIgniter…), Frontend (Angular, React, Vue.js…), Reverse proxy, Node.js, WordPress, Drupal, security headers, rate limiting, expiration by file types…">
|
|
|
<meta property="og:type" content="website">
|
|
|
<meta property="og:url" content="https://nginxconfig.io">
|
|
|
<meta property="og:image" content="https://nginxconfig.io/assets/img/share.png">
|
|
|
</head>
|
|
|
<body ng-app="NginxConfigIoApp" ng-controller="NginxConfigIoController">
|
|
|
<header>
|
|
|
<div class="container">
|
|
|
<img src="assets/img/logo-light.svg" class="logo" alt="nginxconfig.io">
|
|
|
</div>
|
|
|
</header>
|
|
|
<section class="presets">
|
|
|
<div class="container">
|
|
|
<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>
|
|
|
<button type="button" class="btn btn-sm btn-outline-dark" ng-click="setPreset('nodejs')" tooltips tooltip-template="• enabled reverse proxy<br>• disabled PHP" tooltip-side="bottom">Node.js <img src="assets/img/brands/nodejs.svg" alt="Node.js"></button>
|
|
|
<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>
|
|
|
<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>
|
|
|
</div>
|
|
|
</section>
|
|
|
<section class="tabs">
|
|
|
<div class="container">
|
|
|
<div class="row">
|
|
|
<div class="col-lg-8">
|
|
|
<ul class="nav nav-tabs" role="tablist">
|
|
|
<li class="nav-item">
|
|
|
<a class="nav-link" ng-click="setTab('site')" ng-class="{ 'active': tab === 'site', 'changed': getChangesForTab('site') }">Site<small ng-cloak>({{ getChangesForTab('site') }})</small></a>
|
|
|
</li>
|
|
|
<li class="nav-item">
|
|
|
<a class="nav-link" ng-click="setTab('https')" ng-class="{ 'active': tab === 'https', 'changed': getChangesForTab('https') }">HTTPS<small ng-cloak>({{ getChangesForTab('https') }})</small></a>
|
|
|
</li>
|
|
|
<li class="nav-item">
|
|
|
<a class="nav-link" ng-click="setTab('security')" ng-class="{ 'active': tab === 'security', 'changed': getChangesForTab('security') }">Security<small ng-cloak>({{ getChangesForTab('security') }})</small></a>
|
|
|
</li>
|
|
|
<li class="nav-item">
|
|
|
<a class="nav-link" ng-click="setTab('php')" ng-class="{ 'active': tab === 'php', 'changed': getChangesForTab('php') }">PHP<small ng-cloak>({{ getChangesForTab('php') }})</small></a>
|
|
|
</li>
|
|
|
<li class="nav-item">
|
|
|
<a class="nav-link" ng-click="setTab('routing')" ng-class="{ 'active': tab === 'routing', 'changed': getChangesForTab('routing') }">Routing<small ng-cloak>({{ getChangesForTab('routing') }})</small></a>
|
|
|
</li>
|
|
|
<li class="nav-item">
|
|
|
<a class="nav-link" ng-click="setTab('cache')" ng-class="{ 'active': tab === 'cache', 'changed': getChangesForTab('cache') }">Cache<small ng-cloak>({{ getChangesForTab('cache') }})</small></a>
|
|
|
</li>
|
|
|
<li class="nav-item">
|
|
|
<a class="nav-link" ng-click="setTab('proxy')" ng-class="{ 'active': tab === 'proxy', 'changed': getChangesForTab('proxy') }">Reverse proxy<small ng-cloak>({{ getChangesForTab('proxy') }})</small></a>
|
|
|
</li>
|
|
|
<li class="nav-item">
|
|
|
<a class="nav-link" ng-click="setTab('logging')" ng-class="{ 'active': tab === 'logging', 'changed': getChangesForTab('logging') }">Logging<small ng-cloak>({{ getChangesForTab('logging') }})</small></a>
|
|
|
</li>
|
|
|
<li class="nav-item">
|
|
|
<a class="nav-link" ng-click="setTab('nginx')" ng-class="{ 'active': tab === 'nginx', 'changed': getChangesForTab('nginx') }">nginx<small ng-cloak>({{ getChangesForTab('nginx') }})</small></a>
|
|
|
</li>
|
|
|
<li class="nav-item">
|
|
|
<a class="nav-link text-muted" ng-click="setTab('tools')" ng-class="{ 'active': tab === 'tools', 'changed': getChangesForTab('tools') }">Tools<small ng-cloak>({{ getChangesForTab('tools') }})</small></a>
|
|
|
</li>
|
|
|
</ul>
|
|
|
<div class="tab-content">
|
|
|
<div class="tab-pane tab-site" ng-class="{ 'active': tab === 'site' }">
|
|
|
<div class="form-group row">
|
|
|
<label class="col-sm-3 col-form-label col-form-label-sm"><strong>Domain</strong></label>
|
|
|
<div class="col-sm-9">
|
|
|
<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>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="form-group row">
|
|
|
<label class="col-sm-3 col-form-label col-form-label-sm">
|
|
|
<span tooltips tooltip-template="Define path to project.">Path</span>
|
|
|
</label>
|
|
|
<div class="col-sm-9">
|
|
|
<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() }}">
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="form-group row">
|
|
|
<label class="col-sm-3 col-form-label col-form-label-sm">
|
|
|
<span tooltips tooltip-template="Define public path in project path.">Document root</span>
|
|
|
</label>
|
|
|
<div class="col-sm-9">
|
|
|
<input type="text"
|
|
|
class="form-control form-control-sm"
|
|
|
ng-model="data.document_root"
|
|
|
ng-class="{ 'input-changed': data.document_root !== defaultData.document_root }">
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="form-group row">
|
|
|
<label class="col-sm-3 col-form-label col-form-label-sm">
|
|
|
<span tooltips tooltip-template="Serve requests without www subdomain.">www subdomain</span>
|
|
|
</label>
|
|
|
<div class="col-sm-9">
|
|
|
<div class="form-check" ng-class="{ 'input-changed': data.non_www !== defaultData.non_www }">
|
|
|
<input class="form-check-input" type="checkbox" id="non_www" ng-model="data.non_www" ng-true-value="false" ng-false-value="true">
|
|
|
<label class="form-check-label" for="non_www">
|
|
|
enabled <small>({{ isWWW() ? 'www.' : '' }}{{ domain() }})</small>
|
|
|
</label>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="form-group row" ng-if="isWWW()">
|
|
|
<label class="col-sm-3 col-form-label col-form-label-sm">
|
|
|
<span tooltips tooltip-template="Cookie-free CDN subdomain.">CDN subdomain</span>
|
|
|
</label>
|
|
|
<div class="col-sm-9">
|
|
|
<div class="form-check" ng-class="{ 'input-changed': data.cdn !== defaultData.cdn }">
|
|
|
<input class="form-check-input" type="checkbox" id="cdn" ng-model="data.cdn">
|
|
|
<label class="form-check-label" for="cdn">
|
|
|
enabled <small>(cdn.{{ domain() }})</small>
|
|
|
</label>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="form-group row">
|
|
|
<label class="col-sm-3 col-form-label col-form-label-sm">
|
|
|
<span tooltips tooltip-template="Redirect {{ isWWW() ? 'non-www version and ' : '' }}all subdomains to domain.">Redirect {{ isNonWWW() ? 'subdomains' : 'domain, subdomains' }}</span>
|
|
|
</label>
|
|
|
<div class="col-sm-9">
|
|
|
<div class="form-check" ng-class="{ 'input-changed': data.redirect !== defaultData.redirect }">
|
|
|
<input class="form-check-input" type="checkbox" id="redirect" ng-model="data.redirect">
|
|
|
<label class="form-check-label" for="redirect">
|
|
|
enabled <small>(<code>{{ isNonWWW() ? ('*.' + domain() + ' → ' + domain()) : (domain() + ', *.' + domain() + ' → www.' + domain()) }}</code>)</small>
|
|
|
</label>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="form-group row">
|
|
|
<label class="col-sm-3 col-form-label col-form-label-sm">Listen</label>
|
|
|
<div class="col-sm-4">
|
|
|
<div class="input-group input-group-sm">
|
|
|
<div class="input-group-prepend">
|
|
|
<div class="input-group-text">IPv4</div>
|
|
|
</div>
|
|
|
<input type="text"
|
|
|
class="form-control form-control-sm"
|
|
|
ng-model="data.ipv4"
|
|
|
ng-class="{ 'input-changed': data.ipv4 !== defaultData.ipv4 }">
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="col-sm-5">
|
|
|
<div class="input-group input-group-sm">
|
|
|
<div class="input-group-prepend">
|
|
|
<div class="input-group-text">IPv6</div>
|
|
|
</div>
|
|
|
<input type="text"
|
|
|
class="form-control form-control-sm"
|
|
|
ng-model="data.ipv6"
|
|
|
ng-class="{ 'input-changed': data.ipv6 !== defaultData.ipv6 }">
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="tab-pane tab-https" ng-class="{ 'active': tab === 'https' }">
|
|
|
<div class="form-group row">
|
|
|
<label class="col-sm-3 col-form-label col-form-label-sm">
|
|
|
<span tooltips tooltip-template="Provides support for HTTPS.<br><br><i>using Mozilla SSL config</i>">HTTPS</span>
|
|
|
</label>
|
|
|
<div class="col-sm-9">
|
|
|
<div class="form-check" ng-class="{ 'input-changed': data.https !== defaultData.https }">
|
|
|
<input class="form-check-input" type="checkbox" id="https" ng-model="data.https">
|
|
|
<label class="form-check-label" for="https">enabled</span>
|
|
|
</label>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="form-group row" ng-if="isHTTPS()">
|
|
|
<label class="col-sm-3 col-form-label col-form-label-sm">
|
|
|
<span tooltips tooltip-template="Provides support for HTTP/2.">HTTP/2</span>
|
|
|
</label>
|
|
|
<div class="col-sm-9">
|
|
|
<div class="form-check" ng-class="{ 'input-changed': data.http2 !== defaultData.http2 }">
|
|
|
<input class="form-check-input" type="checkbox" id="http2" ng-model="data.http2">
|
|
|
<label class="form-check-label" for="http2">enabled</label>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="form-group row" ng-if="isHTTPS()">
|
|
|
<label class="col-sm-3 col-form-label col-form-label-sm">
|
|
|
<span tooltips tooltip-template="Force redirection from HTTP to HTTPS.">Force HTTPS</span>
|
|
|
</label>
|
|
|
<div class="col-sm-9">
|
|
|
<div class="form-check" ng-class="{ 'input-changed': data.force_https !== defaultData.force_https }">
|
|
|
<input class="form-check-input" type="checkbox" id="force_https" ng-model="data.force_https">
|
|
|
<label class="form-check-label" for="force_https">
|
|
|
enabled <small>(<code>{{ isNonWWW() ? ('http://' + domain() + ' → https://' + domain()) : ('http://www.' + domain() + ' → https://www.' + domain()) }}</code>)</small>
|
|
|
</label>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="form-group row" ng-if="isHTTPS()">
|
|
|
<label class="col-sm-3 col-form-label col-form-label-sm">
|
|
|
<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 class="col-sm-9">
|
|
|
<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">enabled</label>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<fieldset class="form-group" ng-if="isHTTPS()">
|
|
|
<div class="row">
|
|
|
<legend class="col-sm-3 col-form-label col-form-label-sm">SSL profile</legend>
|
|
|
<div class="col-sm-9">
|
|
|
<div class="form-check" ng-class="{ 'input-changed': data.ssl_profile !== defaultData.ssl_profile && data.ssl_profile === 'modern' }">
|
|
|
<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>
|
|
|
<div class="form-check" ng-class="{ 'input-changed': data.ssl_profile !== defaultData.ssl_profile && data.ssl_profile === 'intermediate' }">
|
|
|
<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>
|
|
|
<div class="form-check" ng-class="{ 'input-changed': data.ssl_profile !== defaultData.ssl_profile && data.ssl_profile === 'old' }">
|
|
|
<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>
|
|
|
</fieldset>
|
|
|
<fieldset class="form-group" ng-if="isHTTPS()">
|
|
|
<div class="row">
|
|
|
<legend class="col-sm-3 col-form-label col-form-label-sm">Certification type</legend>
|
|
|
<div class="col-sm-9">
|
|
|
<div class="form-check" ng-class="{ 'input-changed': data.cert_type !== defaultData.cert_type && data.cert_type === 'letsencrypt' }">
|
|
|
<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-check" ng-class="{ 'input-changed': data.cert_type !== defaultData.cert_type && data.cert_type === 'custom' }">
|
|
|
<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">Custom certificate</label>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</fieldset>
|
|
|
<div class="form-group row" ng-if="isHTTPS() && isCertLetsEncrypt()">
|
|
|
<label class="col-sm-3 col-form-label col-form-label-sm">
|
|
|
<span tooltips tooltip-template="Let's Encrypt expiration notify e-mail.">Let's Encrypt e-mail</span>
|
|
|
</label>
|
|
|
<div class="col-sm-9">
|
|
|
<input type="text"
|
|
|
class="form-control form-control-sm"
|
|
|
ng-model="data.email"
|
|
|
ng-class="{ 'input-changed': data.email !== defaultData.email }"
|
|
|
placeholder="{{ 'info@' + domain() }}">
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="form-group row" ng-if="isHTTPS() && isCertCustom()">
|
|
|
<label class="col-sm-3 col-form-label col-form-label-sm">
|
|
|
<code tooltips tooltip-template="Path to crt file">ssl_certificate</code>
|
|
|
</label>
|
|
|
<div class="col-sm-9">
|
|
|
<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' }}">
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="form-group row" ng-if="isHTTPS() && isCertCustom()">
|
|
|
<label class="col-sm-3 col-form-label col-form-label-sm">
|
|
|
<code tooltips tooltip-template="Path to key file">ssl_certificate_key</code>
|
|
|
</label>
|
|
|
<div class="col-sm-9">
|
|
|
<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' }}">
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="form-group row" ng-if="isHTTPS()">
|
|
|
<label class="col-sm-3 col-form-label col-form-label-sm">
|
|
|
<span tooltips tooltip-template="DNS resolver for stapling">OCSP DNS resolvers</span>
|
|
|
</label>
|
|
|
<div class="col-sm-9">
|
|
|
<div class="form-check" ng-class="{ 'input-changed': data.resolver_cloudflare !== defaultData.resolver_cloudflare }">
|
|
|
<input class="form-check-input" type="checkbox" id="resolver_cloudflare" ng-model="data.resolver_cloudflare">
|
|
|
<label class="form-check-label" for="resolver_cloudflare">Cloudflare Resolver (<code>1.1.1.1, 1.0.0.1</code>)</label>
|
|
|
</div>
|
|
|
<div class="form-check" ng-class="{ 'input-changed': data.resolver_google !== defaultData.resolver_google }">
|
|
|
<input class="form-check-input" type="checkbox" id="resolver_google" ng-model="data.resolver_google">
|
|
|
<label class="form-check-label" for="resolver_google">Google Public DNS (<code>8.8.8.8, 8.8.4.4</code>)</label>
|
|
|
</div>
|
|
|
<div class="form-check" ng-class="{ 'input-changed': data.resolver_opendns !== defaultData.resolver_opendns }">
|
|
|
<input class="form-check-input" type="checkbox" id="resolver_opendns" ng-model="data.resolver_opendns">
|
|
|
<label class="form-check-label" for="resolver_opendns">OpenDNS (<code>208.67.222.222, 208.67.220.220</code>)</label>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="tab-pane tab-security" ng-class="{ 'active': tab === 'security' }">
|
|
|
<div class="form-group row">
|
|
|
<label class="col-sm-3 col-form-label col-form-label-sm">
|
|
|
<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>
|
|
|
<div class="col-sm-9">
|
|
|
<select class="custom-select form-control-sm" ng-model="data.referrer_policy" ng-class="{ 'input-changed': data.referrer_policy !== defaultData.referrer_policy }">
|
|
|
<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>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="form-group row">
|
|
|
<label class="col-sm-3 col-form-label col-form-label-sm">
|
|
|
<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>
|
|
|
<div class="col-sm-9">
|
|
|
<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 }">
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="form-group row">
|
|
|
<label class="col-sm-3 col-form-label col-form-label-sm">
|
|
|
<code tooltips tooltip-template="Emitting nginx version on error pages and in the “Server” response header field.">server_tokens</code>
|
|
|
</label>
|
|
|
<div class="col-sm-9">
|
|
|
<div class="form-check" ng-class="{ 'input-changed': data.server_tokens !== defaultData.server_tokens }">
|
|
|
<input class="form-check-input" type="checkbox" id="server_tokens" ng-model="data.server_tokens">
|
|
|
<label class="form-check-label" for="server_tokens">enabled</label>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="form-group row">
|
|
|
<label class="col-sm-3 col-form-label col-form-label-sm">
|
|
|
<code 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.">limit_req</code>
|
|
|
</label>
|
|
|
<div class="col-sm-9">
|
|
|
<div class="form-check" ng-class="{ 'input-changed': data.limit_req !== defaultData.limit_req }">
|
|
|
<input class="form-check-input" type="checkbox" id="limit_req" ng-model="data.limit_req">
|
|
|
<label class="form-check-label" for="limit_req">enabled</label>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="tab-pane tab-php" ng-class="{ 'active': tab === 'php' }">
|
|
|
<div class="form-group row">
|
|
|
<label class="col-sm-3 col-form-label col-form-label-sm">
|
|
|
PHP
|
|
|
</label>
|
|
|
<div class="col-sm-9">
|
|
|
<div class="form-check" ng-class="{ 'input-changed': data.php !== defaultData.php }">
|
|
|
<input class="form-check-input" type="checkbox" id="php" ng-model="data.php">
|
|
|
<label class="form-check-label" for="php">enabled</label>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="form-group row" ng-if="isPHP()">
|
|
|
<label class="col-sm-3 col-form-label col-form-label-sm">
|
|
|
PHP server
|
|
|
</label>
|
|
|
<div class="col-sm-9">
|
|
|
<select class="custom-select form-control-sm" ng-model="data.php_server" ng-class="{ 'input-changed': data.php_server !== defaultData.php_server }">
|
|
|
<option value="127.0.0.1:9000">TCP: 127.0.0.1:9000</option>
|
|
|
<option value="/var/run/hhvm/sock">HHVM socket: /var/run/hhvm/sock</option>
|
|
|
<option value="/var/run/hhvm/hhvm.sock">HHVM socket: /var/run/hhvm/hhvm.sock</option>
|
|
|
<option value="/var/run/php5-fpm.sock">5.x socket: /var/run/php5-fpm.sock</option>
|
|
|
<option value="/var/run/php/php7.0-fpm.sock">7.0 socket: /var/run/php/php7.0-fpm.sock</option>
|
|
|
<option value="/var/run/php/php7.1-fpm.sock">7.1 socket: /var/run/php/php7.1-fpm.sock</option>
|
|
|
<option value="/var/run/php/php7.2-fpm.sock">7.2 socket: /var/run/php/php7.2-fpm.sock</option>
|
|
|
<option value="/var/run/php/php7.3-fpm.sock">7.3 socket: /var/run/php/php7.3-fpm.sock</option>
|
|
|
</select>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="form-group row" ng-if="isPHP()">
|
|
|
<label class="col-sm-3 col-form-label col-form-label-sm">
|
|
|
PHP backup server
|
|
|
</label>
|
|
|
<div class="col-sm-9">
|
|
|
<select class="custom-select form-control-sm" ng-model="data.php_server_backup" ng-class="{ 'input-changed': data.php_server_backup !== defaultData.php_server_backup }">
|
|
|
<option value="">disabled</option>
|
|
|
<option value="127.0.0.1:9000">TCP: 127.0.0.1:9000</option>
|
|
|
<option value="/var/run/hhvm/sock">HHVM socket: /var/run/hhvm/sock</option>
|
|
|
<option value="/var/run/hhvm/hhvm.sock">HHVM socket: /var/run/hhvm/hhvm.sock</option>
|
|
|
<option value="/var/run/php5-fpm.sock">5.x socket: /var/run/php5-fpm.sock</option>
|
|
|
<option value="/var/run/php/php7.0-fpm.sock">7.0 socket: /var/run/php/php7.0-fpm.sock</option>
|
|
|
<option value="/var/run/php/php7.1-fpm.sock">7.1 socket: /var/run/php/php7.1-fpm.sock</option>
|
|
|
<option value="/var/run/php/php7.2-fpm.sock">7.2 socket: /var/run/php/php7.2-fpm.sock</option>
|
|
|
<option value="/var/run/php/php7.3-fpm.sock">7.3 socket: /var/run/php/php7.3-fpm.sock</option>
|
|
|
</select>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="form-group row" ng-if="isPHP()">
|
|
|
<label class="col-sm-3 col-form-label col-form-label-sm">
|
|
|
<span tooltips tooltip-template="WordPress security rules and login limiting <i>(if enabled)</i>.">WordPress rules</span>
|
|
|
</label>
|
|
|
<div class="col-sm-9">
|
|
|
<div class="form-check" ng-class="{ 'input-changed': data.wordpress !== defaultData.wordpress }">
|
|
|
<input class="form-check-input" type="checkbox" id="wordpress" ng-model="data.wordpress">
|
|
|
<label class="form-check-label" for="wordpress">enabled</label>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="form-group row" ng-if="isPHP()">
|
|
|
<label class="col-sm-3 col-form-label col-form-label-sm">
|
|
|
<span tooltips tooltip-template="Drupal security rules and login limiting <i>(if enabled)</i>.">Drupal rules</span>
|
|
|
</label>
|
|
|
<div class="col-sm-9">
|
|
|
<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">enabled</label>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="tab-pane tab-routing" ng-class="{ 'active': tab === 'routing' }">
|
|
|
<fieldset class="form-group">
|
|
|
<div class="row">
|
|
|
<legend class="col-sm-3 col-form-label col-form-label-sm">
|
|
|
<code tooltips tooltip-template="Defines the file that will be used as an index.">index</code>
|
|
|
</legend>
|
|
|
<div class="col-sm-9">
|
|
|
<div class="form-check" ng-class="{ 'input-changed': data.index !== defaultData.index && data.index === 'index.html' }">
|
|
|
<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>
|
|
|
</div>
|
|
|
<div class="form-check" ng-if="isPHP()" ng-class="{ 'input-changed': data.index !== defaultData.index && data.index === 'index.php' }">
|
|
|
<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>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</fieldset>
|
|
|
<fieldset class="form-group">
|
|
|
<div class="row">
|
|
|
<legend class="col-sm-3 col-form-label col-form-label-sm">
|
|
|
<span tooltips tooltip-template="Configures fallback routing of unhandled requests.">Fallback routing</span>
|
|
|
</legend>
|
|
|
<div class="col-sm-9">
|
|
|
<div class="form-check" ng-class="{ 'input-changed': data.fallback_html !== defaultData.fallback_html }">
|
|
|
<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>
|
|
|
<div class="form-check" ng-if="isPHP()" ng-class="{ 'input-changed': data.fallback_php !== defaultData.fallback_php }" ng-cloak>
|
|
|
<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>
|
|
|
</div>
|
|
|
</div>
|
|
|
</fieldset>
|
|
|
<div class="form-group row" ng-if="isFallbackHTML() && isFallbackPHP()">
|
|
|
<label class="col-sm-3 col-form-label col-form-label-sm">Fallback routing - PHP</label>
|
|
|
<div class="col-sm-9">
|
|
|
<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 }">
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="tab-pane tab-cache" ng-class="{ 'active': tab === 'cache' }">
|
|
|
<div class="form-group row">
|
|
|
<label class="col-sm-3 col-form-label col-form-label-sm">
|
|
|
<span tooltips tooltip-template="{{ extensions.assets }}">Expiration - assets</span>
|
|
|
</label>
|
|
|
<div class="col-sm-9">
|
|
|
<input type="text"
|
|
|
class="form-control form-control-sm"
|
|
|
ng-model="data.expires_assets"
|
|
|
ng-class="{ 'input-changed': data.expires_assets !== defaultData.expires_assets }">
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="form-group row">
|
|
|
<label class="col-sm-3 col-form-label col-form-label-sm">
|
|
|
<span tooltips tooltip-template="{{ extensions.images }}|{{ extensions.audio }}|{{ extensions.video }}">Expiration - media</span>
|
|
|
</label>
|
|
|
<div class="col-sm-9">
|
|
|
<input type="text"
|
|
|
class="form-control form-control-sm"
|
|
|
ng-model="data.expires_media"
|
|
|
ng-class="{ 'input-changed': data.expires_media !== defaultData.expires_media }">
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="form-group row">
|
|
|
<label class="col-sm-3 col-form-label col-form-label-sm">
|
|
|
<span tooltips tooltip-template="{{ extensions.svg }}">Expiration - svg</span>
|
|
|
</label>
|
|
|
<div class="col-sm-9">
|
|
|
<input type="text"
|
|
|
class="form-control form-control-sm"
|
|
|
ng-model="data.expires_svg"
|
|
|
ng-class="{ 'input-changed': data.expires_svg !== defaultData.expires_svg }">
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="form-group row">
|
|
|
<label class="col-sm-3 col-form-label col-form-label-sm">
|
|
|
<span tooltips tooltip-template="{{ extensions.fonts }}">Expiration - fonts</span>
|
|
|
</label>
|
|
|
<div class="col-sm-9">
|
|
|
<input type="text"
|
|
|
class="form-control form-control-sm"
|
|
|
ng-model="data.expires_fonts"
|
|
|
ng-class="{ 'input-changed': data.expires_fonts !== defaultData.expires_fonts }">
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="tab-pane tab-proxy" ng-class="{ 'active': tab === 'proxy' }">
|
|
|
<div class="form-group row">
|
|
|
<label class="col-sm-3 col-form-label col-form-label-sm">
|
|
|
Reverse proxy
|
|
|
</label>
|
|
|
<div class="col-sm-9">
|
|
|
<div class="form-check" ng-class="{ 'input-changed': data.proxy !== defaultData.proxy }">
|
|
|
<input class="form-check-input" type="checkbox" id="proxy" ng-model="data.proxy">
|
|
|
<label class="form-check-label" for="proxy">enabled</label>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="form-group row" ng-if="isProxy()">
|
|
|
<label class="col-sm-3 col-form-label col-form-label-sm">
|
|
|
Path
|
|
|
</label>
|
|
|
<div class="col-sm-9">
|
|
|
<input type="text"
|
|
|
class="form-control form-control-sm"
|
|
|
ng-model="data.proxy_path"
|
|
|
ng-class="{ 'input-changed': data.proxy_path !== defaultData.proxy_path }">
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="form-group row" ng-if="isProxy()">
|
|
|
<label class="col-sm-3 col-form-label col-form-label-sm">
|
|
|
<code>proxy_pass</code>
|
|
|
</label>
|
|
|
<div class="col-sm-9">
|
|
|
<input type="text"
|
|
|
class="form-control form-control-sm"
|
|
|
ng-model="data.proxy_pass"
|
|
|
ng-class="{ 'input-changed': data.proxy_pass !== defaultData.proxy_pass }">
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="tab-pane tab-logging" ng-class="{ 'active': tab === 'logging' }">
|
|
|
<div class="form-group row">
|
|
|
<label class="col-sm-3 col-form-label col-form-label-sm">
|
|
|
<code tooltips tooltip-template="Sets the path, format, and configuration for a buffered log write.">access_log</code>
|
|
|
</label>
|
|
|
<div class="col-sm-9">
|
|
|
<input type="text"
|
|
|
class="form-control form-control-sm"
|
|
|
ng-model="data.access_log"
|
|
|
ng-class="{ 'input-changed': data.access_log !== defaultData.access_log }">
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="form-group row">
|
|
|
<label class="col-sm-3 col-form-label col-form-label-sm">
|
|
|
<code tooltips tooltip-template="Configures logging path (with warn level).">error_log</code>
|
|
|
</label>
|
|
|
<div class="col-sm-9">
|
|
|
<input type="text"
|
|
|
class="form-control form-control-sm"
|
|
|
ng-model="data.error_log"
|
|
|
ng-class="{ 'input-changed': data.error_log !== defaultData.error_log }">
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="form-group row" ng-if="isAccessLog()">
|
|
|
<label class="col-sm-3 col-form-label col-form-label-sm">
|
|
|
<span tooltips tooltip-template="Domain specific access_log."><code>access_log</code> by domain</span>
|
|
|
</label>
|
|
|
<div class="col-sm-9">
|
|
|
<div class="form-check" ng-class="{ 'input-changed': data.access_log_domain !== defaultData.access_log_domain }">
|
|
|
<input class="form-check-input" type="checkbox" id="access_log_domain" ng-model="data.access_log_domain">
|
|
|
<label class="form-check-label" for="access_log_domain">enabled</label>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="form-group row" ng-if="isErrorLog()">
|
|
|
<label class="col-sm-3 col-form-label col-form-label-sm">
|
|
|
<span tooltips tooltip-template="Domain specific error_log."><code>error_log</code> by domain</span>
|
|
|
</label>
|
|
|
<div class="col-sm-9">
|
|
|
<div class="form-check" ng-class="{ 'input-changed': data.error_log_domain !== defaultData.error_log_domain }">
|
|
|
<input class="form-check-input" type="checkbox" id="error_log_domain" ng-model="data.error_log_domain">
|
|
|
<label class="form-check-label" for="error_log_domain">enabled</label>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="form-group row">
|
|
|
<label class="col-sm-3 col-form-label col-form-label-sm">
|
|
|
<code tooltips tooltip-template="Logging of errors about not found files into error_log.">log_not_found</code>
|
|
|
</label>
|
|
|
<div class="col-sm-9">
|
|
|
<div class="form-check" ng-class="{ 'input-changed': data.log_not_found !== defaultData.log_not_found }">
|
|
|
<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">enabled</label>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="tab-pane tab-nginx" ng-class="{ 'active': tab === 'nginx' }">
|
|
|
<div class="form-group row">
|
|
|
<label class="col-sm-3 col-form-label col-form-label-sm">
|
|
|
<code tooltips tooltip-template="Sets the maximum number of simultaneous connections that can be opened by a worker process.">worker_processes</code>
|
|
|
</label>
|
|
|
<div class="col-sm-9">
|
|
|
<select class="custom-select form-control-sm" ng-model="data.worker_processes" ng-class="{ 'input-changed': data.worker_processes !== defaultData.worker_processes }">
|
|
|
<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>
|
|
|
<div class="form-group row">
|
|
|
<label class="col-sm-3 col-form-label col-form-label-sm">
|
|
|
<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>
|
|
|
<div class="col-sm-9">
|
|
|
<input type="text"
|
|
|
class="form-control form-control-sm"
|
|
|
ng-model="data.user"
|
|
|
ng-class="{ 'input-changed': data.user !== defaultData.user }">
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="form-group row">
|
|
|
<label class="col-sm-3 col-form-label col-form-label-sm">
|
|
|
<code tooltips tooltip-template="Defines a file that will store the process ID of the main process.">pid</code>
|
|
|
</label>
|
|
|
<div class="col-sm-9">
|
|
|
<input type="text"
|
|
|
class="form-control form-control-sm"
|
|
|
ng-model="data.pid"
|
|
|
ng-class="{ 'input-changed': data.pid !== defaultData.pid }">
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="form-group row">
|
|
|
<label class="col-sm-3 col-form-label col-form-label-sm">
|
|
|
<code tooltips tooltip-template="Sets the maximum allowed size of the client request body.">client_max_body_size</code>
|
|
|
</label>
|
|
|
<div class="col-sm-9">
|
|
|
<div class="input-group input-group-sm">
|
|
|
<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 }">
|
|
|
<div class="input-group-append">
|
|
|
<div class="input-group-text">MB</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="tab-pane tab-tools" ng-class="{ 'active': tab === 'tools' }">
|
|
|
<div class="form-group row">
|
|
|
<label class="col-sm-3 col-form-label col-form-label-sm">Download generated config</label>
|
|
|
<div class="col-sm-9">
|
|
|
<button class="btn btn-primary btn-sm btn-download" ng-click="downloadZip()"><img src="assets/img/download.svg" alt="Download"> Download ZIP</button>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="form-group row">
|
|
|
<label class="col-sm-3 col-form-label col-form-label-sm">
|
|
|
<span tooltips tooltip-template="Multiple configuration files<br><br><i>(ideal for multi-domain environment)</i>">Modularized structure</span>
|
|
|
</label>
|
|
|
<div class="col-sm-9">
|
|
|
<div class="form-check" ng-class="{ 'input-changed': data.file_structure !== defaultData.file_structure }">
|
|
|
<input class="form-check-input" type="checkbox" id="file_structure" ng-model="data.file_structure" ng-true-value="'modularized'" ng-false-value="'unified'">
|
|
|
<label class="form-check-label" for="file_structure">enabled</label>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="form-group row">
|
|
|
<label class="col-sm-3 col-form-label col-form-label-sm">Share settings</label>
|
|
|
<div class="col-sm-9">
|
|
|
<input type="text"
|
|
|
class="form-control form-control-sm"
|
|
|
readonly
|
|
|
ng-value="location.absUrl()">
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="form-group row mt-4">
|
|
|
<label class="col-sm-3 col-form-label col-form-label-sm">Reset settings</label>
|
|
|
<div class="col-sm-9">
|
|
|
<button class="btn btn-danger btn-sm btn-reset" ng-click="reset()">Reset</button>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="col-lg-4">
|
|
|
<aside class="sidebar">
|
|
|
<iframe class="github-star" src="https://ghbtns.com/github-btn.html?user=valentinxxx&repo=nginxconfig.io&type=star&count=true&size=large"></iframe>
|
|
|
<div class="github-link">
|
|
|
<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>
|
|
|
</div>
|
|
|
<div class="adsbygoogle-container">
|
|
|
<div class="note">▾ advertisement ▾</div>
|
|
|
<ins class="adsbygoogle"
|
|
|
style="display:block"
|
|
|
data-ad-client="ca-pub-6543577519725877"
|
|
|
data-ad-slot="2065709573"
|
|
|
data-ad-format="auto"
|
|
|
data-full-width-responsive="true"></ins>
|
|
|
<script>
|
|
|
(adsbygoogle = window.adsbygoogle || []).push({});
|
|
|
</script>
|
|
|
</div>
|
|
|
</aside>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</section>
|
|
|
<main>
|
|
|
<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 class="commands">
|
|
|
<pre><code class="hljs bash" ng-include="'templates/commands.html?v=COMMIT_HASH'"></code></pre>
|
|
|
</div>
|
|
|
</div>
|
|
|
<section class="file grid-item" ng-class="isModularized() || isWordPress() ? 'col-xl-6' : 'col-xl-12'" ng-cloak>
|
|
|
<strong>/etc/nginx/nginx.conf</strong>
|
|
|
<button class="btn btn-light btn-clipboard" ngclipboard data-clipboard-target="#file-nginx" ngclipboard-success="clipboardSuccess('nginx.conf')">
|
|
|
<img src="assets/img/clipboard-dark.svg" alt="Copy to clipboard">
|
|
|
</button>
|
|
|
<span class="clipboard-success" ng-if="clipboardCopy === 'nginx.conf'">Copied!</span>
|
|
|
<div class="code source" data-filename="nginx.conf">
|
|
|
<pre><code class="nginx" ng-include="'templates/conf/nginx.conf.html?v=COMMIT_HASH'" onload="refreshHighlighting()"></code></pre>
|
|
|
</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>
|
|
|
<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">
|
|
|
<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>
|
|
|
<section class="col-xl-6 grid-item file" ng-if="isModularized() && isCertLetsEncrypt()" ng-cloak>
|
|
|
<strong>/etc/nginx/nginxconfig.io/letsencrypt.conf</strong>
|
|
|
<button class="btn btn-light btn-clipboard" ngclipboard data-clipboard-target="#file-letsencrypt" ngclipboard-success="clipboardSuccess('letsencrypt.conf')">
|
|
|
<img src="assets/img/clipboard-dark.svg" alt="Copy to clipboard">
|
|
|
</button>
|
|
|
<span class="clipboard-success" ng-if="clipboardCopy === 'letsencrypt.conf'">Copied!</span>
|
|
|
<div class="code source" data-filename="nginxconfig.io/letsencrypt.conf">
|
|
|
<pre><code class="nginx" ng-include="'templates/conf/nginxconfig.io/letsencrypt.conf.html?v=COMMIT_HASH'" onload="refreshHighlighting()"></code></pre>
|
|
|
</div><div id="file-letsencrypt" class="code highlighted"></div>
|
|
|
</section>
|
|
|
<section class="col-xl-6 grid-item file" ng-if="isModularized()" ng-cloak>
|
|
|
<strong>/etc/nginx/nginxconfig.io/general.conf</strong>
|
|
|
<button class="btn btn-light btn-clipboard" ngclipboard data-clipboard-target="#file-general" ngclipboard-success="clipboardSuccess('general.conf')">
|
|
|
<img src="assets/img/clipboard-dark.svg" alt="Copy to clipboard">
|
|
|
</button>
|
|
|
<span class="clipboard-success" ng-if="clipboardCopy === 'general.conf'">Copied!</span>
|
|
|
<div class="code source" data-filename="nginxconfig.io/general.conf">
|
|
|
<pre><code class="nginx" ng-include="'templates/conf/nginxconfig.io/general.conf.html?v=COMMIT_HASH'" onload="refreshHighlighting()"></code></pre>
|
|
|
</div><div id="file-general" class="code highlighted"></div>
|
|
|
</section>
|
|
|
<section class="col-xl-6 grid-item file" ng-if="isPHP() && (isModularized() || isWordPress())" ng-cloak>
|
|
|
<strong>/etc/nginx/nginxconfig.io/php_fastcgi.conf</strong>
|
|
|
<button class="btn btn-light btn-clipboard" ngclipboard data-clipboard-target="#file-php_fastcgi" ngclipboard-success="clipboardSuccess('php_fastcgi.conf')">
|
|
|
<img src="assets/img/clipboard-dark.svg" alt="Copy to clipboard">
|
|
|
</button>
|
|
|
<span class="clipboard-success" ng-if="clipboardCopy === 'php_fastcgi.conf'">Copied!</span>
|
|
|
<div class="code source" data-filename="nginxconfig.io/php_fastcgi.conf">
|
|
|
<pre><code class="nginx" ng-include="'templates/conf/nginxconfig.io/php_fastcgi.conf.html?v=COMMIT_HASH'" onload="refreshHighlighting()"></code></pre>
|
|
|
</div><div id="file-php_fastcgi" class="code highlighted"></div>
|
|
|
</section>
|
|
|
<section class="col-xl-6 grid-item file" ng-if="isProxy() && isModularized()" ng-cloak>
|
|
|
<strong>/etc/nginx/nginxconfig.io/proxy.conf</strong>
|
|
|
<button class="btn btn-light btn-clipboard" ngclipboard data-clipboard-target="#file-proxy" ngclipboard-success="clipboardSuccess('proxy.conf')">
|
|
|
<img src="assets/img/clipboard-dark.svg" alt="Copy to clipboard">
|
|
|
</button>
|
|
|
<span class="clipboard-success" ng-if="clipboardCopy === 'proxy.conf'">Copied!</span>
|
|
|
<div class="code source" data-filename="nginxconfig.io/proxy.conf">
|
|
|
<pre><code class="nginx" ng-include="'templates/conf/nginxconfig.io/proxy.conf.html?v=COMMIT_HASH'" onload="refreshHighlighting()"></code></pre>
|
|
|
</div><div id="file-proxy" class="code highlighted"></div>
|
|
|
</section>
|
|
|
<section class="col-xl-6 grid-item file" ng-if="isWordPress() && isModularized()" ng-cloak>
|
|
|
<strong>/etc/nginx/nginxconfig.io/wordpress.conf</strong>
|
|
|
<button class="btn btn-light btn-clipboard" ngclipboard data-clipboard-target="#file-wordpress" ngclipboard-success="clipboardSuccess('wordpress.conf')">
|
|
|
<img src="assets/img/clipboard-dark.svg" alt="Copy to clipboard">
|
|
|
</button>
|
|
|
<span class="clipboard-success" ng-if="clipboardCopy === 'wordpress.conf'">Copied!</span>
|
|
|
<div class="code source" data-filename="nginxconfig.io/wordpress.conf">
|
|
|
<pre><code class="nginx" ng-include="'templates/conf/nginxconfig.io/wordpress.conf.html?v=COMMIT_HASH'" onload="refreshHighlighting()"></code></pre>
|
|
|
</div><div id="file-wordpress" class="code highlighted"></div>
|
|
|
</section>
|
|
|
<section class="col-xl-6 grid-item file" ng-if="isDrupal() && isModularized()" ng-cloak>
|
|
|
<strong>/etc/nginx/nginxconfig.io/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="nginxconfig.io/drupal.conf">
|
|
|
<pre><code class="nginx" ng-include="'templates/conf/nginxconfig.io/drupal.conf.html?v=COMMIT_HASH'" onload="refreshHighlighting()"></code></pre>
|
|
|
</div><div id="file-drupal" class="code highlighted"></div>
|
|
|
</section>
|
|
|
</div>
|
|
|
</div>
|
|
|
</main>
|
|
|
<footer>
|
|
|
<div class="container-fluid">
|
|
|
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>
|
|
|
</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>
|
|
|
<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>
|
|
|
<script src="assets/js/jszip.min.js?v=3.1.5"></script>
|
|
|
<script src="assets/js/filesaver.min.js?v=1.3.4"></script>
|
|
|
<script src="assets/js/app.js?v=COMMIT_HASH"></script>
|
|
|
</body>
|
|
|
</html>
|