|
@@ -0,0 +1,55 @@
|
|
|
+user nginx;
|
|
|
+worker_processes 1;
|
|
|
+
|
|
|
+error_log /var/log/nginx/error.log warn;
|
|
|
+pid /var/run/nginx.pid;
|
|
|
+
|
|
|
+events {
|
|
|
+ worker_connections 1024;
|
|
|
+}
|
|
|
+
|
|
|
+http {
|
|
|
+ include /etc/nginx/mime.types;
|
|
|
+ default_type application/octet-stream;
|
|
|
+
|
|
|
+ log_format main '[$time_local] $remote_addr - $remote_user - $server_name to: $upstream_addr: $request upstream_response_time $upstream_response_time msec $msec request_time $request_time';
|
|
|
+
|
|
|
+ access_log /var/log/nginx/access.log main;
|
|
|
+
|
|
|
+ sendfile on;
|
|
|
+
|
|
|
+ client_max_body_size 128m;
|
|
|
+
|
|
|
+ keepalive_timeout 65;
|
|
|
+
|
|
|
+ gzip on;
|
|
|
+
|
|
|
+ server {
|
|
|
+ listen 80;
|
|
|
+
|
|
|
+ location / {
|
|
|
+ rewrite /(.*) /index.html break;
|
|
|
+ proxy_pass http://frei_backend:8080/;
|
|
|
+ proxy_redirect off;
|
|
|
+ proxy_set_header Host $host:$server_port;
|
|
|
+ proxy_set_header X-Real-IP $remote_addr;
|
|
|
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
|
+ proxy_connect_timeout 1200;
|
|
|
+ proxy_send_timeout 1200;
|
|
|
+ proxy_read_timeout 1200;
|
|
|
+ }
|
|
|
+
|
|
|
+ location /api/ {
|
|
|
+ proxy_pass http://frei_backend:8080/api/;
|
|
|
+ proxy_redirect off;
|
|
|
+ proxy_set_header Host $host:$server_port;
|
|
|
+ proxy_set_header X-Real-IP $remote_addr;
|
|
|
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
|
+ proxy_connect_timeout 1200;
|
|
|
+ proxy_send_timeout 1200;
|
|
|
+ proxy_read_timeout 1200;
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+}
|
|
|
+
|