mirror of
https://github.com/ZwareBear/awx.git
synced 2026-03-20 07:43:35 -05:00
nginx config fixes
This commit is contained in:
@@ -1,31 +1,51 @@
|
|||||||
worker_processes auto;
|
worker_processes auto;
|
||||||
|
|
||||||
# Enable upgrading of connection (and websocket proxying) depending on the
|
error_log /var/log/nginx/error.log warn;
|
||||||
# presence of the upgrade field in the client request header
|
pid /var/run/nginx.pid;
|
||||||
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
upstream daphne {
|
events {
|
||||||
server 127.0.0.1:8051;
|
worker_connections 1024;
|
||||||
}
|
}
|
||||||
|
|
||||||
http {
|
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_cache shared:SSL:10m;
|
||||||
ssl_session_timeout 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 {
|
server {
|
||||||
listen 80;
|
listen 80 default_server;
|
||||||
listen 443 ssl;
|
listen 443 default_server ssl;
|
||||||
|
|
||||||
# If you have a domain name, this is where to add it
|
# If you have a domain name, this is where to add it
|
||||||
server_name localhost *;
|
server_name _;
|
||||||
keepalive_timeout 70;
|
keepalive_timeout 70;
|
||||||
|
|
||||||
ssl_certificate /etc/tower/tower.crt;
|
ssl_certificate /etc/tower/tower.crt;
|
||||||
@@ -59,18 +79,8 @@ http {
|
|||||||
}
|
}
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
uwsgi_pass uwsgi;
|
|
||||||
include /etc/nginx/uwsgi_params;
|
include /etc/nginx/uwsgi_params;
|
||||||
|
uwsgi_pass uwsgi;
|
||||||
#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;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user