Skip to content
Snippets Groups Projects
Commit 8884598a authored by Benjamin Bellamy's avatar Benjamin Bellamy :speech_balloon: Committed by Yassine Doghri
Browse files

fix(docker): update nginx configuration

parent a2a87abf
No related branches found
No related tags found
1 merge request!265Update docker nginx
Pipeline #11438 passed
Pipeline: Castopod

#11439

    ......@@ -3,3 +3,4 @@ memory_limit = 512M
    upload_max_filesize = 500M
    post_max_size = 512M
    max_execution_time = 300
    max_input_time = 300
    ......@@ -35,44 +35,42 @@ http {
    root /var/www/html;
    index index.php index.html index.htm;
    server_tokens off;
    add_header X-Frame-Options sameorigin always;
    add_header Permissions-Policy interest-cohort=();
    add_header X-Content-Type-Options nosniff;
    add_header Strict-Transport-Security "max-age=31536000; includeSubDomains; preload;";
    client_max_body_size 512M;
    client_body_timeout 300s;
    client_max_body_size 1G;
    fastcgi_buffers 64 4K;
    gzip on;
    gzip_vary on;
    gzip_comp_level 4;
    gzip_min_length 256;
    gzip_types application/atom+xml application/javascript audio/mpeg application/rss+xml image/bmp image/png image/jpeg image/webp image/svg+xml image/x-icon video/mp4 text/css text/plain text/html;
    gzip_types application/atom+xml application/javascript application/rss+xml image/bmp image/svg+xml image/x-icon text/css text/plain text/html;
    location ~ /.*\.(png|ico|txt|js|js\.map)$ {
    try_files $uri =404;
    }
    location ~ /(assets|media)/.*$ {
    try_files $uri =404;
    }
    try_files $uri $uri/ /index.php?$args;
    index index.php index.html;
    location /.well-known/GDPR.yml {
    try_files $uri =404;
    }
    location / {
    fastcgi_param SCRIPT_FILENAME /opt/castopod/public/index.php;
    location ~ \.php$ {
    include fastcgi_params;
    fastcgi_param SERVER_NAME $host;
    fastcgi_intercept_errors on;
    fastcgi_index index.php;
    fastcgi_pass php-handler;
    fastcgi_param SERVER_NAME $host;
    fastcgi_pass php-handler;
    fastcgi_param SCRIPT_FILENAME /opt/castopod/public/$fastcgi_script_name;
    try_files $uri =404;
    fastcgi_read_timeout 3600;
    fastcgi_send_timeout 3600;
    }
    location ~ \.php$ {
    try_files $uri =404;
    fastcgi_param SCRIPT_FILENAME /opt/castopod/public/$fastcgi_script_name;
    include fastcgi_params;
    fastcgi_param SERVER_NAME $host;
    fastcgi_index index.php;
    fastcgi_pass php-handler;
    location ~* ^.+\.(css|js|jpg|jpeg|gif|png|ico|gz|svg|svgz|ttf|otf|woff|woff2|eot|mp4|ogg|ogv|webm|webp|zip|swf|map)$ {
    add_header Access-Control-Allow-Origin "*";
    expires max;
    access_log off;
    }
    }
    }
    0% Loading or .
    You are about to add 0 people to the discussion. Proceed with caution.
    Please register or to comment