diff options
| author | name <email here> | 2024-08-14 14:39:18 +0800 |
|---|---|---|
| committer | name <email here> | 2024-08-14 14:39:18 +0800 |
| commit | b1f88b682624e85b4b743343dfaaeed113b69413 (patch) | |
| tree | f5944621027aa5372782287041f07799ba57ed71 /nginx.conf | |
pushing configs, no automated setup yet
Diffstat (limited to 'nginx.conf')
| -rw-r--r-- | nginx.conf | 63 |
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 | |||
| 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 | } | ||
