cours-snt/test-python-ssh/nginx/nginx.conf
2021-02-05 17:11:47 +01:00

48 lines
872 B
Nginx Configuration File

user www-data;
worker_processes auto;
include /etc/nginx/modules-enabled/*.conf;
events {
worker_connections 768;
# multi_accept on;
}
http {
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;
# server_tokens off;
include /etc/nginx/mime.types;
default_type application/octet-stream;
types_hash_max_size 2048;
types_hash_bucket_size 128;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # Dropping SSLv3, ref: POODLE
ssl_prefer_server_ciphers on;
error_log /dev/stderr;
access_log /dev/stdout;
gzip on;
server {
listen 80;
listen [::]:80;
root /usr/share/app/modules/
location / {
index index.html main.py;
try_files $uri $uri/ =404;
}
location ~ \.py {
include uwsgi_params;
#uwsgi_param PATH_INFO "$1";
#uwsgi_param SCRIPT_NAME /;
uwsgi_pass unix:/tmp/uwsgi/uwsgi.sock;
}
}
}