diff options
| author | hc <hc@email.ch> | 2024-11-20 12:51:33 +0800 |
|---|---|---|
| committer | hc <hc@email.ch> | 2024-11-20 12:51:33 +0800 |
| commit | 853b82126baa1e8e408a10f91053c52626ffad29 (patch) | |
| tree | 2fc1de9695810681ba654aab3c2a4867aacc1ac7 /nginx.conf | |
| parent | b1f88b682624e85b4b743343dfaaeed113b69413 (diff) | |
working
Diffstat (limited to 'nginx.conf')
| -rw-r--r-- | nginx.conf | 63 |
1 files changed, 0 insertions, 63 deletions
diff --git a/nginx.conf b/nginx.conf deleted file mode 100644 index fc11627..0000000 --- a/nginx.conf +++ /dev/null | |||
| @@ -1,63 +0,0 @@ | |||
| 1 | |||
| 2 | user nginx; | ||
| 3 | worker_processes auto; | ||
| 4 | |||
| 5 | error_log /var/log/nginx/error.log notice; | ||
| 6 | pid /var/run/nginx.pid; | ||
| 7 | |||
| 8 | |||
| 9 | events { | ||
| 10 | worker_connections 1024; | ||
| 11 | } | ||
| 12 | |||
| 13 | |||
| 14 | http { | ||
| 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 | } | ||
