|
| 1 | +user nginx; |
| 2 | +worker_processes auto; |
| 3 | +pid /var/run/nginx.pid; |
| 4 | + |
| 5 | +events { |
| 6 | + worker_connections 1024; |
| 7 | +} |
| 8 | + |
| 9 | +http { |
| 10 | + include /etc/nginx/mime.types; |
| 11 | + default_type application/octet-stream; |
| 12 | + |
| 13 | + log_format main '$remote_addr - $remote_user [$time_local] "$request" ' |
| 14 | + '$status $body_bytes_sent "$http_referer" ' |
| 15 | + '"$http_user_agent" "$http_x_forwarded_for"'; |
| 16 | + error_log /var/log/nginx/error.log warn; |
| 17 | + access_log /var/log/nginx/access.log main; |
| 18 | + |
| 19 | + server { |
| 20 | + listen 80; |
| 21 | + server_name stg.api.docsa.o-r.kr; |
| 22 | + |
| 23 | + location ^~ /.well-known/acme-challenge/ { |
| 24 | + root /var/www/certbot; |
| 25 | + } |
| 26 | + |
| 27 | + location / {return 301 https://$host$request_uri; } |
| 28 | + } |
| 29 | + |
| 30 | +; server { |
| 31 | +; listen 443 ssl http2; |
| 32 | +; server_name stg.api.docsa.o-r.kr; |
| 33 | +; |
| 34 | +; ssl_certificate /etc/letsencrypt/live/stg.api.docsa.o-r.kr/fullchain.pem; |
| 35 | +; ssl_certificate_key /etc/letsencrypt/live/stg.api.docsa.o-r.kr/privkey.pem; |
| 36 | +; |
| 37 | +; ssl_protocols TLSv1.2 TLSv1.3; |
| 38 | +; ssl_ciphers HIGH:!aNULL:!MD5; |
| 39 | +; ssl_prefer_server_ciphers on; |
| 40 | +; |
| 41 | +; ssl_session_cache shared:SSL:10m; |
| 42 | +; ssl_session_timeout 1d; |
| 43 | +; |
| 44 | +; location / { |
| 45 | +; proxy_pass http://app:8080; |
| 46 | +; proxy_http_version 1.1; |
| 47 | +; proxy_set_header Connection ""; |
| 48 | +; proxy_set_header Host $host; |
| 49 | +; proxy_set_header X-Real-IP $remote_addr; |
| 50 | +; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; |
| 51 | +; proxy_set_header X-Forwarded-Proto $scheme; |
| 52 | +; } |
| 53 | +; |
| 54 | +; |
| 55 | +; location /grafana/ { |
| 56 | +; proxy_pass http://grafana:3000; |
| 57 | +; |
| 58 | +; proxy_http_version 1.1; |
| 59 | +; proxy_set_header Upgrade $http_upgrade; |
| 60 | +; proxy_set_header Connection "upgrade"; |
| 61 | +; proxy_read_timeout 3600; |
| 62 | +; |
| 63 | +; proxy_set_header Host $host; |
| 64 | +; proxy_set_header X-Real-IP $remote_addr; |
| 65 | +; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; |
| 66 | +; proxy_set_header X-Forwarded-Proto $scheme; |
| 67 | +; proxy_set_header X-Forwarded-Host $host; |
| 68 | +; proxy_redirect off; |
| 69 | +; } |
| 70 | +; |
| 71 | +; location = /actuator/prometheus { return 404; } |
| 72 | +; |
| 73 | +; } |
| 74 | +} |
| 75 | + |
0 commit comments