jean-cloud-services/old_services/coldcms.chahut.jean-cloud.net/nginx_server.conf
2024-10-16 11:41:44 +02:00

56 lines
1.3 KiB
Plaintext

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 www.$JC_SERVICE;
add_header Strict-Transport-Security "max-age=31536000";
gzip on;
gzip_disable "msie6";
gzip_types text/plain text/css application/json text/xml application/xml text/javascript application/x-javascript;
gzip_min_length 1000;
gzip_proxied no-cache no-store private expired auth;
gzip_vary on;
root $HTTP_DIR;
location / {
set $try_files_value '';
if ($request_method = GET){
set $try_files_value $uri/;
}
gzip_static on;
try_files $try_files_value @uwsgi_backend;
}
location @uwsgi_backend {
uwsgi_pass $NET.100:8000;
include uwsgi_params;
client_max_body_size 20m;
}
location /media/ {
gzip_static on;
expires 100d;
add_header Cache-Control public;
access_log off;
}
location /static/ {
gzip_static on;
expires 100d;
add_header Cache-Control public;
access_log off;
}
location /admin/ {
uwsgi_pass $NET.100:8000;
include uwsgi_params;
client_max_body_size 20m;
}
}