Created
February 28, 2018 03:56
-
-
Save xabbu/467927f8c8bec3fe8bd8eed2cfea09f7 to your computer and use it in GitHub Desktop.
configure and simple nginx conf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
./configure --prefix=/usr/share/nginx --conf-path=/etc/nginx/nginx.conf --http-log-path=/var/log/nginx/access.log --error-log-path=/var/log/nginx/error.log --lock-path=/var/lock/nginx.lock --pid-path=/run/nginx.pid --http-client-body-temp-path=/var/lib/nginx/body --http-fastcgi-temp-path=/var/lib/nginx/fastcgi --http-proxy-temp-path=/var/lib/nginx/proxy --with-http_ssl_module --with-http_realip_module --with-http_auth_request_module --with-http_v2_module --with-http_slice_module --with-threads --with-http_addition_module --with-http_geoip_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_sub_module --add-module=../ngx_brotli | |
# configuration file /etc/nginx/nginx.conf: | |
user www-data; | |
pid /run/nginx.pid; | |
events { | |
worker_connections 768; | |
} | |
http { | |
include /etc/nginx/mime.types; | |
ssl_protocols TLSv1 TLSv1.1 TLSv1.2; | |
log_format compressed '[$time_local] "$request" $status ' | |
'$body_bytes_sent gzip $gzip_ratio br $brotli_ratio'; | |
access_log /var/log/nginx/access.log compressed; | |
error_log /var/log/nginx/error.log; | |
gzip on; | |
gzip_comp_level 1; | |
gzip_types text/plain text/css; | |
brotli on; | |
brotli_comp_level 1; | |
brotli_types text/plain text/css; | |
server { | |
listen 80 default_server; | |
listen [::]:80 default_server; | |
listen 443 ssl http2 default_server; | |
listen [::]:443 ssl http2 default_server; | |
include snippets/snakeoil.conf; | |
root /var/www/html; | |
index index.html index.htm index.nginx-debian.html; | |
server_name _; | |
location / { | |
try_files $uri $uri/ =404; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment