blob: 32beca1c7094db3b89c6fc0acb4ff50b5d3207af [file] [log] [blame]
ecaiyanlinux113bf092020-08-01 14:05:17 +00001user www-data;
2worker_processes auto;
3pid /run/nginx.pid;
4include /etc/nginx/modules-enabled/*.conf;
5
6events {
7 worker_connections 768;
8 # multi_accept on;
9}
10
11http {
12
13 ##
14 # Basic Settings
15 ##
16
17 sendfile on;
18 tcp_nopush on;
19 tcp_nodelay on;
20 keepalive_timeout 65;
21 types_hash_max_size 2048;
22 # server_tokens off;
23
24 # server_names_hash_bucket_size 64;
25 # server_name_in_redirect off;
26
27 include /etc/nginx/mime.types;
28 default_type application/octet-stream;
29
30 server { # simple reverse-proxy
31 listen 8090;
32 listen [::]:8090;
33 listen 8091 ssl;
34 listen [::]:8091 ssl;
35 server_name localhost;
36 ssl_certificate /usr/src/app/cert/cert.crt;
37 ssl_certificate_key /usr/src/app/cert/key.crt;
38 ssl_password_file /usr/src/app/cert/pass;
39
40 # serve dynamic requests
41 location / {
BjornMagnussonXAc963b732021-01-20 14:24:13 +010042 proxy_set_header Host $host;
43 proxy_set_header X-Real-IP $remote_addr;
44 proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
45 proxy_pass http://localhost:2222;
BjornMagnussonXA6fc58fd2021-11-18 08:19:45 +010046
47 client_max_body_size 0;
ecaiyanlinux113bf092020-08-01 14:05:17 +000048 }
BjornMagnussonXA6fc58fd2021-11-18 08:19:45 +010049
ecaiyanlinux113bf092020-08-01 14:05:17 +000050 }
51 ##
52 # SSL Settings
53 ##
54
55 ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # Dropping SSLv3, ref: POODLE
56 ssl_prefer_server_ciphers on;
57
58 ##
59 # Logging Settings
60 ##
61
62 access_log /var/log/nginx/access.log;
63 error_log /var/log/nginx/error.log;
64
65 ##
66 # Gzip Settings
67 ##
68
69 gzip on;
70
71 # gzip_vary on;
72 # gzip_proxied any;
73 # gzip_comp_level 6;
74 # gzip_buffers 16 8k;
75 # gzip_http_version 1.1;
76 # gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
77
78 ##
79 # Virtual Host Configs
80 ##
81
82 include /etc/nginx/conf.d/*.conf;
83 include /etc/nginx/sites-enabled/*;
84}
85
86
87#mail {
88# # See sample authentication script at:
89# # http://wiki.nginx.org/ImapAuthenticateWithApachePhpScript
90#
91# # auth_http localhost/auth.php;
92# # pop3_capabilities "TOP" "USER";
93# # imap_capabilities "IMAP4rev1" "UIDPLUS";
94#
95# server {
96# listen localhost:110;
97# protocol pop3;
98# proxy on;
99# }
100#
101# server {
102# listen localhost:143;
103# protocol imap;
104# proxy on;
105# }
106#}