summaryrefslogtreecommitdiffstats
path: root/nginx/nginx.conf
diff options
context:
space:
mode:
Diffstat (limited to 'nginx/nginx.conf')
-rw-r--r--nginx/nginx.conf44
1 files changed, 28 insertions, 16 deletions
diff --git a/nginx/nginx.conf b/nginx/nginx.conf
index 363e205..4ab113a 100644
--- a/nginx/nginx.conf
+++ b/nginx/nginx.conf
@@ -1,30 +1,42 @@
-#user nginx;
-worker_processes 1;
-error_log logs/error.log;
-error_log logs/error.log notice;
-error_log logs/error.log info;
+error_log /var/log/nginx/error.log debug;
-pid nginx.pid;
+http {
+ limit_req_zone $binary_remote_addr zone=one:10m rate=1r/s;
-events {
- worker_connections 4096;
-}
+ client_body_temp_path /tmp/nginx 1 2;
+ proxy_temp_path /tmp/nginx-proxy;
+ fastcgi_temp_path /tmp/nginx-fastcgi;
+ uwsgi_temp_path /tmp/nginx-uwsgi;
+ scgi_temp_path /tmp/nginx-scgi;
-http {
+ upstream tosca_server {
+ server unix:/run/gunicorn/tosca_server.sock fail_timeout=0;
+ }
+
server {
- listen 8085;
- server_name localhost;
- charset utf-8r;
+ listen 8085 ;
+ charset utf-8;
+ client_max_body_size 75M; # adjust to taste
+
+ access_log /var/log/nginx/nginx-access.log;
location / {
- include uwsgi_params;
- uwsgi_pass unix:/run/uwsgi/tosca.sock;
-
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+ proxy_set_header X-Forwarded-Proto $scheme;
+ proxy_set_header Host $http_host;
+ proxy_redirect off;
+
+ proxy_pass http://tosca_server;
+
+ limit_req zone=one;
}
}
+} #http
+events {
+ worker_connections 4096; ## Default: 1024
}