56 lines
1.1 KiB
Plaintext
Executable File
56 lines
1.1 KiB
Plaintext
Executable File
server {
|
|
listen 443 ssl http2;
|
|
listen [::]:443 ssl http2;
|
|
ssl_certificate $JC_CERT/fullchain.pem;
|
|
ssl_certificate_key $JC_CERT/privkey.pem;
|
|
server_name $JC_SERVICE benevoles.karnaval.fr;
|
|
|
|
root $DATA_DIR/assets;
|
|
|
|
gzip on;
|
|
gzip_static on;
|
|
gzip_types application/javascript image/* text/css application/font-woff application/font-woff2;
|
|
gunzip on;
|
|
|
|
ssl_session_tickets off;
|
|
ssl_protocols TLSv1.2 TLSv1.3;
|
|
ssl_buffer_size 4k;
|
|
client_max_body_size 4M;
|
|
|
|
location / {
|
|
include uwsgi_params;
|
|
uwsgi_pass unix:/tmp/uwsgi/$JC_SERVICE/uwsgi.sock;
|
|
}
|
|
|
|
location = /favicon.ico {
|
|
root $DATA_DIR/assets/;
|
|
}
|
|
location = /favicon-admin.ico {
|
|
root $DATA_DIR/assets/;
|
|
}
|
|
|
|
location /assets/ {
|
|
alias $DATA_DIR/assets/;
|
|
access_log off;
|
|
sendfile on;
|
|
tcp_nopush on;
|
|
sendfile_max_chunk 1m;
|
|
keepalive_timeout 65;
|
|
location ~* \.(jpg|jpeg|png|gif|ico|woff|woff2)$ {
|
|
access_log off;
|
|
expires 5d;
|
|
}
|
|
}
|
|
|
|
location /media/ {
|
|
alias $DATA_DIR/media/;
|
|
access_log off;
|
|
sendfile on;
|
|
tcp_nopush on;
|
|
sendfile_max_chunk 1m;
|
|
keepalive_timeout 65;
|
|
}
|
|
|
|
|
|
}
|