4 include /etc/nginx/modules-enabled/*.conf;
9 worker_connections 768;
23 types_hash_max_size 2048;
26 # server_names_hash_bucket_size 64;
27 # server_name_in_redirect off;
29 include /etc/nginx/mime.types;
30 default_type application/octet-stream;
32 perl_set $allow_http 'sub { return $ENV{"ALLOW_HTTP"}; }';
34 server { # simple reverse-proxy
37 server_name localhost;
38 if ($allow_http != true) {
42 # serve dynamic requests
44 proxy_set_header Host $host;
45 proxy_set_header X-Real-IP $remote_addr;
46 proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
47 proxy_pass http://localhost:2222;
51 server { # simple reverse-proxy
54 server_name localhost;
55 ssl_certificate /usr/src/app/cert/cert.crt;
56 ssl_certificate_key /usr/src/app/cert/key.crt;
57 ssl_password_file /usr/src/app/cert/pass;
59 # serve dynamic requests
61 proxy_set_header Host $host;
62 proxy_set_header X-Real-IP $remote_addr;
63 proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
64 proxy_pass http://localhost:2222;
71 ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # Dropping SSLv3, ref: POODLE
72 ssl_prefer_server_ciphers on;
78 access_log /var/log/nginx/access.log;
79 error_log /var/log/nginx/error.log;
91 # gzip_http_version 1.1;
92 # gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
95 # Virtual Host Configs
98 include /etc/nginx/conf.d/*.conf;
99 include /etc/nginx/sites-enabled/*;
104 # # See sample authentication script at:
105 # # http://wiki.nginx.org/ImapAuthenticateWithApachePhpScript
107 # # auth_http localhost/auth.php;
108 # # pop3_capabilities "TOP" "USER";
109 # # imap_capabilities "IMAP4rev1" "UIDPLUS";
112 # listen localhost:110;
118 # listen localhost:143;