Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

572
Views
La compresión Nginx gzip no funciona para css o js

La compresión gzip funciona para páginas html, pero no para css o js. Encontré varias preguntas similares, incluidas las siguientes, y probé las soluciones sugeridas. Probé varias configuraciones para (gzip_buffers, gzip_min_length, gzip_comp_level) pero ninguna tiene trabajó.

¿Qué más podría estar afectando esto? ¿Por qué no se comprimen los archivos js o css?

NGINX gzip no comprime archivos JavaScript

La compresión nginx gzip no funciona

habilitar la compresión gzip con nginx

Tengo el siguiente bloque http en nginx conf:

 http { upstream fastcgi_backend { server 127.0.0.1:9000; } sendfile on; tcp_nopush on; tcp_nodelay on; keepalive_timeout 65; types_hash_max_size 2048; include /etc/nginx/mime.types; default_type application/octet-stream; ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # Dropping SSLv3, ref: POODLE ssl_prefer_server_ciphers on; access_log off; #access_log /var/log/nginx/access.log; error_log /var/log/nginx/error.log; # Enable Gzip compression gzip on; gzip_vary on; gzip_buffers 128 4k; # Compression level (1-9) gzip_comp_level 5; # Don't compress anything under 256 bytes gzip_min_length 256; # Compress output of these MIME-types gzip_types application/atom+xml application/javascript application/json application/rss+xml application/vnd.ms-fontobject application/x-font-ttf application/x-font-opentype application/x-font-truetype application/x-javascript application/x-web-app-manifest+json application/xhtml+xml application/xml font/eot font/opentype font/otf image/svg+xml image/x-icon image/vnd.microsoft.icon text/css text/plain text/javascript text/x-component; # Disable gzip for bad browsers gzip_disable "MSIE [1-6]\.(?!.*SV1)"; # allow the server to close connection on non responding client, this will free up memory reset_timedout_connection on; # request timed out -- default 60 client_body_timeout 10; }
over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Verifique la carpeta conf.d para ver si hay otros archivos conf que puedan estar anulando nginx.conf , debería ver al menos un archivo con un bloque de servidor para el nombre de host/IP que Nginx está sirviendo. Se ve como esto:

 server { listen 80; listen [::]:80; server_name example.com; return 301 https://example.com$request_uri; } server { listen 443 ssl http2; listen [::]:443 ssl http2; server_name example.com; ... }

Siempre puede buscar los bloques del servidor: $ grep -rl "server_name" /etc/nginx

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!