|
| 1 | +server { |
| 2 | + listen 80; |
| 3 | + server_name pivotchain.in; |
| 4 | + client_max_body_size 100M; |
| 5 | + return 301 https://pivotchain.in$request_uri; |
| 6 | +} |
| 7 | + |
| 8 | + upstream eventapp { |
| 9 | + server 10.13.10.12; |
| 10 | + server 10.13.10.13; |
| 11 | + } |
| 12 | + |
| 13 | + upstream mobileapp { |
| 14 | + server 10.13.10.12; |
| 15 | + server 10.13.10.13; |
| 16 | + } |
| 17 | + |
| 18 | + |
| 19 | + upstream analytics { |
| 20 | + server 10.13.10.12; |
| 21 | + server 10.13.10.13; |
| 22 | + } |
| 23 | + |
| 24 | + upstream ingress { |
| 25 | + server 10.13.10.12; |
| 26 | + server 10.13.10.13; |
| 27 | + } |
| 28 | + |
| 29 | + |
| 30 | + |
| 31 | + upstream nginx { |
| 32 | + server 10.13.10.12; |
| 33 | + server 10.13.10.13; |
| 34 | + } |
| 35 | + |
| 36 | +server { |
| 37 | + listen 443 ssl; |
| 38 | + server_name pivotchain.in; |
| 39 | + ssl_certificate /etc/nginx/ssl/server.crt; |
| 40 | + ssl_certificate_key /etc/nginx/ssl/server.key; |
| 41 | + client_max_body_size 1024M; |
| 42 | + |
| 43 | + location / { |
| 44 | + add_header Strict-Transport-Security 'max-age=31536000; includeSubDomains; preload'; |
| 45 | + add_header X-Content-Type-Options nosniff; |
| 46 | + proxy_set_header Host $host; |
| 47 | + proxy_set_header X-Real-IP $remote_addr; |
| 48 | + proxy_set_header X-Forwarded-for $remote_addr; |
| 49 | + proxy_connect_timeout 300; |
| 50 | + proxy_read_timeout 300; |
| 51 | + proxy_send_timeout 300; |
| 52 | + port_in_redirect off; |
| 53 | + proxy_pass http://ingress/; |
| 54 | + client_max_body_size 1024M; |
| 55 | + proxy_ignore_client_abort on; |
| 56 | + |
| 57 | + } |
| 58 | + |
| 59 | +location /event-app/ { |
| 60 | + add_header X-Content-Type-Options nosniff; |
| 61 | + add_header Strict-Transport-Security 'max-age=31536000; includeSubDomains; preload'; |
| 62 | + proxy_set_header Host $host; |
| 63 | + proxy_set_header X-Real-IP $remote_addr; |
| 64 | + proxy_set_header X-Forwarded-for $remote_addr; |
| 65 | + proxy_connect_timeout 300; |
| 66 | + proxy_read_timeout 300; |
| 67 | + proxy_send_timeout 300; |
| 68 | + port_in_redirect off; |
| 69 | + proxy_pass http://eventapp; |
| 70 | + client_max_body_size 100M; |
| 71 | + |
| 72 | + } |
| 73 | + |
| 74 | + |
| 75 | +location /mobile-app/ { |
| 76 | + add_header X-Content-Type-Options nosniff; |
| 77 | + add_header Strict-Transport-Security 'max-age=31536000; includeSubDomains; preload'; |
| 78 | + proxy_set_header Host $host; |
| 79 | + proxy_set_header X-Real-IP $remote_addr; |
| 80 | + proxy_set_header X-Forwarded-for $remote_addr; |
| 81 | + proxy_connect_timeout 300; |
| 82 | + proxy_read_timeout 300; |
| 83 | + proxy_send_timeout 300; |
| 84 | + port_in_redirect off; |
| 85 | + proxy_pass http://mobileapp; |
| 86 | + client_max_body_size 100M; |
| 87 | + error_log /var/log/nginx/mobileapp_error.log; |
| 88 | + access_log /var/log/nginx/mobileapp_access.log; |
| 89 | + } |
| 90 | + |
| 91 | + |
| 92 | +location /analytics-app/ { |
| 93 | + add_header X-Content-Type-Options nosniff; |
| 94 | + add_header Strict-Transport-Security 'max-age=31536000; includeSubDomains; preload'; |
| 95 | + proxy_set_header Host $host; |
| 96 | + proxy_set_header X-Real-IP $remote_addr; |
| 97 | + proxy_set_header X-Forwarded-for $remote_addr; |
| 98 | + proxy_connect_timeout 300; |
| 99 | + proxy_read_timeout 300; |
| 100 | + proxy_send_timeout 300; |
| 101 | + port_in_redirect off; |
| 102 | + proxy_pass http://analytics; |
| 103 | + client_max_body_size 1024M; |
| 104 | + proxy_ignore_client_abort on; |
| 105 | + |
| 106 | + } |
| 107 | + |
| 108 | + |
| 109 | +location /nginx/ { |
| 110 | + add_header X-Content-Type-Options nosniff; |
| 111 | + add_header Strict-Transport-Security 'max-age=31536000; includeSubDomains; preload'; |
| 112 | + proxy_set_header Host $host; |
| 113 | + proxy_set_header X-Real-IP $remote_addr; |
| 114 | + proxy_set_header X-Forwarded-for $remote_addr; |
| 115 | + proxy_connect_timeout 300; |
| 116 | + proxy_read_timeout 300; |
| 117 | + proxy_send_timeout 300; |
| 118 | + port_in_redirect off; |
| 119 | + proxy_pass http://nginx; |
| 120 | + client_max_body_size 100M; |
| 121 | + |
| 122 | + } |
| 123 | + |
| 124 | +location /ISO/ { |
| 125 | + alias /usr/local/ISO_UPDATE/; |
| 126 | + autoindex on; |
| 127 | + auth_basic "Restricted Content"; |
| 128 | + auth_basic_user_file /etc/nginx/auth/htpasswd; |
| 129 | + } |
| 130 | + |
| 131 | +location /release/ { |
| 132 | + alias /usr/local/RELEASE/; |
| 133 | + autoindex on; |
| 134 | + auth_basic "Restricted Content"; |
| 135 | + auth_basic_user_file /etc/nginx/auth/htpasswd; |
| 136 | + } |
| 137 | + |
| 138 | +location /doc-images/ { |
| 139 | + alias /usr/local/dock-images/; |
| 140 | + autoindex on; |
| 141 | + } |
| 142 | + |
| 143 | + |
| 144 | +} |
0 commit comments