1
0
mirror of https://github.com/sharkdp/bat.git synced 2025-07-02 21:23:27 +01:00
Files
.github
assets
diagnostics
doc
examples
src
tests
benchmarks
examples
scripts
snapshots
syntax-tests
highlighted
source
ARM Assembly
ASP
AWK
ActionScript
Apache
AppleScript
AsciiDoc
Assembly (x86_64)
Bash
Batch
BibTeX
C
C-Sharp
CMake
CSS
CSV
Clojure
Cpp
CpuInfo
Crystal
D
Dart
Diff
Dockerfile
DotENV
Elixir
Elm
Email
Erlang
EtcGroup
Fish
Fstab
GLSL
Git Attributes
Git Config
Git Ignore
Go
GraphQL
Graphviz DOT
Groovy
HTML
Haskell
Hosts
INI
JSON
Java
JavaScript
Jinja2
Julia
Kotlin
Lean
Less
Lisp
Lua
MATLAB
Makefile
Manpage
Markdown
MemInfo
Ninja
OCaml
Objective-C
Objective-C++
PHP
Pascal
Passwd
Perl
Plaintext
PowerShell
Protocol Buffer
PureScript
Python
QML
R
Regular Expression
RequirementsTXT
Ruby
Ruby Haml
Ruby On Rails
Rust
SCSS
SLS
SML
SQL
SSH Config
SSHD Config
Sass
Scala
Svelte
Swift
TOML
Tcl
TeX
Terraform
Textile
TypeScript
VimL
Vue
XML
YAML
Zig
nginx
nginx.conf
nim
nix
orgmode
reStructuredText
compare_highlighted_versions.py
create_highlighted_versions.py
regression_test.sh
update.sh
.gitattributes
assets.rs
integration_tests.rs
no_duplicate_extensions.rs
snapshot_tests.rs
tester.rs
.gitignore
.gitmodules
CHANGELOG.md
CONTRIBUTING.md
Cargo.lock
Cargo.toml
LICENSE-APACHE
LICENSE-MIT
README.md
build.rs
bat/tests/syntax-tests/source/nginx/nginx.conf
Alan Berndt 99ac5c3045 Add fairly complex nginx config.
This is to contribute to issue .  I took some of the more
complicated servers I am running as examples.  Everything looks to be
correctly highlighted compared to vim's syntax highlighting.
2020-10-24 14:10:51 +02:00

141 lines
3.0 KiB
Nginx Configuration File

#user nobody;
worker_processes 1;
#pid logs/nginx.pid;
load_module "/usr/local/libexec/nginx/ngx_http_xslt_filter_module.so";
load_module "/usr/local/libexec/nginx/ngx_rtmp_module.so";
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
gzip on;
gzip_disable "msie6";
include /usr/local/etc/nginx/sites.d/*;
}
rtmp {
server {
listen 1935;
max_message 10M;
application wnob {
live on;
record off;
}
application strim {
live on;
hls on;
hls_path /usr/local/www/hls/;
hls_variant _low BANDWIDTH=250000;
hls_variant _mid BANDWIDTH=500000;
hls_variant _high BANDWIDTH=1000000;
hls_variant _hd720 BANDWIDTH=1500000;
hls_variant _src BANDWIDTH=2000000;
}
}
}
server {
listen 443 ssl;
server_name host.example.com
root /usr/local/www/host.example.com/;
error_page 404 /404.html;
index index.html;
autoindex on;
autoindex_localtime off;
autoindex_format xml;
location / {
xslt_stylesheet /usr/local/www/host.example.com/index.xslt;
}
location ~ /\..* {
return 404;
}
location ~ /.+/ {
xslt_stylesheet /usr/local/www/host.example.com/project.xslt;
}
location ~ /.*\.xslt/ {
return 404;
}
location ~ \.thumb\.png$ {
error_page 404 /404.thumb.png;
}
ssl_certificate /usr/local/etc/letsencrypt/live/host.example.com/fullchain.pem; # managed by Certbot
ssl_certificate_key /usr/local/etc/letsencrypt/live/host.example.com/privkey.pem; # managed by Certbot
include /usr/local/etc/letsencrypt/options-ssl-nginx.conf;
ssl_dhparam /usr/local/etc/letsencrypt/ssl-dhparams.pem;
add_header Strict-Transport-Security "max-age=31536000" always;
}
server {
listen 80;
server_name host.example.com;
if ($host = host.example.com) {
return 301 https://$host$request_uri;
}
return 404;
}
server {
listen 443 ssl;
server_name other.example.com;
ssl_certificate /usr/local/etc/letsencrypt/live/other.example.com/fullchain.pem;
ssl_certificate_key /usr/local/etc/letsencrypt/live/other.example.com/privkey.pem;
include /usr/local/etc/letsencrypt/options-ssl-nginx.conf;
ssl_dhparam /usr/local/etc/letsencrypt/ssl-dhparams.pem;
add_header Strict-Transport-Security "max-age=31536000" always;
access_log /home/otherapp/logs/access.log;
error_log /home/otherapp/logs/error.log;
client_max_body_size 5M;
location / {
root /home/otherapp/app/static;
index man.txt;
try_files $uri @proxy;
}
location @proxy {
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://unix:/var/run/otherapp/sock:;
}
}
server {
listen 80;
server_name other.example.com;
if ($host = other.example.com) {
return 301 https://$host$request_uri;
}
return 404;
}