diff options
author | Wayne Witzel III <wayne@riotousliving.com> | 2016-10-14 19:38:09 +0200 |
---|---|---|
committer | Wayne Witzel III <wayne@riotousliving.com> | 2016-10-14 19:38:09 +0200 |
commit | 0c7014eacbe271ed3da877310d75950394ac7153 (patch) | |
tree | 1b8d9e811733f5fbf276cc029991bd477dca4512 /config | |
parent | Merge branch 'devel' into channels-deployment (diff) | |
download | awx-0c7014eacbe271ed3da877310d75950394ac7153.tar.xz awx-0c7014eacbe271ed3da877310d75950394ac7153.zip |
nginx config fixes
Diffstat (limited to 'config')
-rw-r--r-- | config/awx-nginx.conf | 66 |
1 files changed, 38 insertions, 28 deletions
diff --git a/config/awx-nginx.conf b/config/awx-nginx.conf index b883bc56f5..6089cb7a3c 100644 --- a/config/awx-nginx.conf +++ b/config/awx-nginx.conf @@ -1,31 +1,51 @@ -worker_processes auto; +worker_processes auto; -# Enable upgrading of connection (and websocket proxying) depending on the -# presence of the upgrade field in the client request header -map \$http_upgrade \$connection_upgrade { -default upgrade; -'' close; -} - -# Create an upstream alias to where we've set daphne to bind to -upstream uwsgi { - server 127.0.0.1:8050; -} +error_log /var/log/nginx/error.log warn; +pid /var/run/nginx.pid; -upstream daphne { - server 127.0.0.1:8051; +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"'; + + access_log /var/log/nginx/access.log main; + + map $http_upgrade $connection_upgrade { + default upgrade; + '' close; + } + + sendfile on; + #tcp_nopush on; + ssl_session_cache shared:SSL:10m; ssl_session_timeout 10m; + keepalive_timeout 65; + + #gzip on; + + upstream uwsgi { + server 127.0.0.1:8050; + } + + upstream daphne { + server 127.0.0.1:8051; + } + server { - listen 80; - listen 443 ssl; + listen 80 default_server; + listen 443 default_server ssl; # If you have a domain name, this is where to add it - server_name localhost *; + server_name _; keepalive_timeout 70; ssl_certificate /etc/tower/tower.crt; @@ -59,18 +79,8 @@ http { } location / { - uwsgi_pass uwsgi; include /etc/nginx/uwsgi_params; - - #proxy_pass http://uwsgi; - #proxy_http_version 1.1; - #proxy_buffering off; - #proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - #proxy_set_header X-Forwarded-Proto https; - #proxy_set_header Host $http_host; - #proxy_redirect off; - #proxy_set_header Upgrade $http_upgrade; - #proxy_set_header Connection $connection_upgrade; + uwsgi_pass uwsgi; } } } |