summaryrefslogtreecommitdiff
path: root/nginx.conf
diff options
context:
space:
mode:
Diffstat (limited to 'nginx.conf')
-rw-r--r--nginx.conf63
1 files changed, 63 insertions, 0 deletions
diff --git a/nginx.conf b/nginx.conf
new file mode 100644
index 0000000..fc11627
--- /dev/null
+++ b/nginx.conf
@@ -0,0 +1,63 @@
1
2user nginx;
3worker_processes auto;
4
5error_log /var/log/nginx/error.log notice;
6pid /var/run/nginx.pid;
7
8
9events {
10 worker_connections 1024;
11}
12
13
14http {
15 include /etc/nginx/mime.types;
16 default_type application/octet-stream;
17
18
19 log_format main '$remote_addr - $remote_user [$time_local] "$request" '
20 '$status $body_bytes_sent "$http_referer" '
21 '"$http_user_agent" "$http_x_forwarded_for" '
22 'ssl_protocol:$ssl_protocol ssl_cipher:$ssl_cipher '
23 'ssl_client_verify:$ssl_client_verify '
24 'ssl_client_s_dn:$ssl_client_s_dn';
25 access_log /var/log/nginx/access.log main;
26
27 sendfile on;
28 #tcp_nopush on;
29
30 keepalive_timeout 65;
31
32 #gzip on;
33
34# include /etc/nginx/conf.d/*.conf;
35
36 server {
37 location / {
38 return 301 https://$host$request_uri;
39 #root /data/www;
40 #autoindex on;
41 #autoindex_exact_size off;
42 }
43 }
44 server {
45 listen 443 ssl;
46 server_name localhost;
47
48 ssl_certificate /home/x/auths1/server.crt;
49 ssl_certificate_key /home/x/auths1/server.key;
50 ssl_client_certificate /home/x/auths1/ca.pem;
51 ssl_verify_client on;
52
53 location / {
54 proxy_pass http://localhost:5000;
55 proxy_set_header Host $host;
56 proxy_set_header X-Real-IP $remote_addr;
57 proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
58 proxy_set_header X-Forwarded-Proto $scheme;
59
60 }
61 }
62
63}