summaryrefslogtreecommitdiff
path: root/nginx.conf
diff options
context:
space:
mode:
authorname <email here>2024-08-14 14:39:18 +0800
committername <email here>2024-08-14 14:39:18 +0800
commitb1f88b682624e85b4b743343dfaaeed113b69413 (patch)
treef5944621027aa5372782287041f07799ba57ed71 /nginx.conf
pushing configs, no automated setup yet
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 @@
+
+user nginx;
+worker_processes auto;
+
+error_log /var/log/nginx/error.log notice;
+pid /var/run/nginx.pid;
+
+
+events {
+ worker_connections 1024;
+}
+
+
+http {
+ include /etc/nginx/mime.types;
+ default_type application/octet-stream;
+
+
+ log_format main '$remote_addr - $remote_user [$time_local] "$request" '
+ '$status $body_bytes_sent "$http_referer" '
+ '"$http_user_agent" "$http_x_forwarded_for" '
+ 'ssl_protocol:$ssl_protocol ssl_cipher:$ssl_cipher '
+ 'ssl_client_verify:$ssl_client_verify '
+ 'ssl_client_s_dn:$ssl_client_s_dn';
+ access_log /var/log/nginx/access.log main;
+
+ sendfile on;
+ #tcp_nopush on;
+
+ keepalive_timeout 65;
+
+ #gzip on;
+
+# include /etc/nginx/conf.d/*.conf;
+
+ server {
+ location / {
+ return 301 https://$host$request_uri;
+ #root /data/www;
+ #autoindex on;
+ #autoindex_exact_size off;
+ }
+ }
+ server {
+ listen 443 ssl;
+ server_name localhost;
+
+ ssl_certificate /home/x/auths1/server.crt;
+ ssl_certificate_key /home/x/auths1/server.key;
+ ssl_client_certificate /home/x/auths1/ca.pem;
+ ssl_verify_client on;
+
+ location / {
+ proxy_pass http://localhost:5000;
+ proxy_set_header Host $host;
+ proxy_set_header X-Real-IP $remote_addr;
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+ proxy_set_header X-Forwarded-Proto $scheme;
+
+ }
+ }
+
+}