Ticket #1841: nginx.conf

File nginx.conf, 885 bytes (added by Peter Pramberger, 7 years ago)

Sample config

Line 
1error_log logs/error_global notice;
2
3working_directory run;
4
5pid run/nginx.plgrngx.pid;
6lock_file run/nginx.plgrngx.lock;
7
8worker_processes 2;
9
10error_log logs/error_global debug;
11
12events {
13}
14
15http {
16 default_type text/plain;
17
18 disable_symlinks if_not_owner;
19
20 root htdocs;
21 index index.html index.htm;
22
23 map $time_iso8601 $date_ymd {
24 default 'date_not_found';
25 '~^(?<y>\d{4})-(?<m>\d{2})-(?<d>\d{2})' $y$m$d;
26 }
27
28 error_page 404 /error/50x.html;
29
30 open_log_file_cache max=200 inactive=5m valid=15m;
31
32 access_log logs/access_global-$date_ymd combined;
33
34 server {
35 listen 127.0.0.1:30001;
36 server_name localhost;
37
38 access_log logs/access_$server_name-$date_ymd combined;
39
40 location /error/ {
41 alias /opt/sits/nginx/nginx116/html/;
42 internal;
43 }
44 }
45}