Warning, /frameworks/syntax-highlighting/autotests/folding/nginx.conf.fold is written in an unsupported language. File is not indexed.

0001 # example nginx config for highlighting
0002 
0003 user nginx;
0004 worker_processes auto;
0005 error_log /var/log/nginx/error.log;
0006 pid /run/nginx.pid;
0007 
0008 # Load dynamic modules. See /usr/share/nginx/README.dynamic.
0009 include /usr/share/nginx/modules/*.conf;
0010 
0011 events <beginfold id='1'>{</beginfold id='1'>
0012     worker_connections 1024;
0013 <endfold id='1'>}</endfold id='1'>
0014 
0015 http <beginfold id='1'>{</beginfold id='1'>
0016     server_tokens off;
0017     include             /etc/nginx/mime.types;
0018     default_type        application/octet-stream;
0019 
0020     server_names_hash_bucket_size 64;
0021     server_names_hash_max_size 1024;
0022     types_hash_max_size 2048;
0023 
0024     log_format  main  <beginfold id='2'>'</beginfold id='2'>$remote_addr - $remote_user [$time_local] "$request" <endfold id='2'>'</endfold id='2'>
0025                       <beginfold id='2'>'</beginfold id='2'>$status $body_bytes_sent "$http_referer" <endfold id='2'>'</endfold id='2'>
0026                       <beginfold id='2'>'</beginfold id='2'>"$http_user_agent" "$http_x_forwarded_for"<endfold id='2'>'</endfold id='2'>;
0027 
0028     map $remote_addr $not_lb_request <beginfold id='1'>{</beginfold id='1'>
0029       192.168.1.234 0;  # our loadbalancer
0030       default       1;  # any other host
0031     <endfold id='1'>}</endfold id='1'>
0032 
0033     access_log  /var/log/nginx/access.log  main if=$not_lb_request;
0034 
0035     real_ip_header X-Forwarded-For;
0036     set_real_ip_from 192.168.1.234;  # trust our loadbalancer to present the correct client IP
0037 
0038     map $http_x_forwarded_proto $real_scheme <beginfold id='1'>{</beginfold id='1'>
0039         default $http_x_forwarded_proto;
0040         <beginfold id='2'>'</beginfold id='2'><endfold id='2'>'</endfold id='2'>      $scheme;
0041     <endfold id='1'>}</endfold id='1'>
0042 
0043     sendfile            on;
0044     tcp_nopush          on;
0045     tcp_nodelay         on;
0046 
0047     keepalive_timeout   75 20;
0048     ignore_invalid_headers on;
0049 
0050     gzip off;
0051 
0052     charset utf-8;
0053     index index.html index.htm;
0054 
0055     server <beginfold id='1'>{</beginfold id='1'>
0056         listen       80;
0057         server_name  localhost;
0058 
0059         location / <beginfold id='1'>{</beginfold id='1'>
0060             root   html;
0061             index  index.html index.htm;
0062         <endfold id='1'>}</endfold id='1'>
0063 
0064         error_page   404 /404.html;
0065 
0066         # redirect server error pages to the static page /50x.html
0067         error_page   500 502 503 504  /50x.html;
0068         location = /50x.html <beginfold id='1'>{</beginfold id='1'>
0069             root   html;
0070         <endfold id='1'>}</endfold id='1'>
0071 
0072         # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
0073         location ~ \.php$ <beginfold id='1'>{</beginfold id='1'>
0074             root           html;
0075             fastcgi_pass   127.0.0.1:9000;
0076             fastcgi_index  index.php;
0077             fastcgi_param  SCRIPT_FILENAME  /scripts$fastcgi_script_name;
0078             include        fastcgi_params;
0079         <endfold id='1'>}</endfold id='1'>
0080 
0081         # deny access to .htaccess files, if Apache's document root
0082         # concurs with nginx's one
0083         location ~ /\.ht <beginfold id='1'>{</beginfold id='1'>
0084             deny  all;
0085         <endfold id='1'>}</endfold id='1'>
0086     <endfold id='1'>}</endfold id='1'>
0087 
0088     # HTTPS server
0089     server <beginfold id='1'>{</beginfold id='1'>
0090         listen       443 ssl;
0091         server_name  localhost secure.example.org;
0092 
0093         ssl_certificate      cert.pem;
0094         ssl_certificate_key  cert.key;
0095 
0096         ssl_session_cache    shared:SSL:1m;
0097         ssl_session_timeout  5m;
0098 
0099         ssl_ciphers  HIGH:!aNULL:!MD5;
0100         ssl_prefer_server_ciphers  on;
0101 
0102         location / <beginfold id='1'>{</beginfold id='1'>
0103             root   html;
0104             index  index.html index.htm;
0105         <endfold id='1'>}</endfold id='1'>
0106     <endfold id='1'>}</endfold id='1'>
0107 
0108     # default server block
0109     server <beginfold id='1'>{</beginfold id='1'>
0110         listen       80;
0111         server_name  _;
0112 
0113         location / <beginfold id='1'>{</beginfold id='1'>
0114             return 403;
0115         <endfold id='1'>}</endfold id='1'>
0116 
0117         location /tftp <beginfold id='1'>{</beginfold id='1'>
0118             allow 192.168.1.0/24;
0119             deny all;
0120             root /data;
0121         <endfold id='1'>}</endfold id='1'>
0122     <endfold id='1'>}</endfold id='1'>
0123 
0124     # "unit" testing ;-)
0125     client_body_timeout 1y 12M 52w 365d 1337h 256m 42s 440ms;
0126     client_max_body_size 1024 56k 56K 64m 64M 32g 32G;
0127 <endfold id='1'>}</endfold id='1'>