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

239
Views
Sirviendo correctamente manifest.json a través del gunicorn de Django

Tengo una aplicación web Django que utiliza un proxy inverso nginx con un servidor de aplicaciones gunicorn (ascendente).

Mis registros de nginx se están llenando con errores como estos: 2020/03/03 22:51:57 [error] 9605#9605: *162393 upstream sent too big header while reading response header from upstream, client: 168.155.46.104, server: example.com, request: "GET /static/img/favicons/manifest.json HTTP/2.0", upstream: "http://unix:/home/ubuntu/app/myproj/gunicorn.sock:/static/img/favicons/manifest.json", host: "example.com", referrer: "https://example.com/signup/create-pass/new/6d756265726e2d3131/18/"

Supongo que gunicorn no pudo servir manifest.json .

Esto no debería haber sucedido. Creé manifest.json y lo coloqué en la ubicación correspondiente. El uso del verificador de Favicon en https://realfavicongenerator.net/ me muestra este error: The Web App Manifest at https://example/com/static/img/favicons/site.webmanifest cannot be downloaded . Si presiono esa URL directamente en el navegador, termino viendo un error 502 Bad Gateway.

¿Cómo puedo arreglar esto?

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Descubrí el error.

Se supone que los archivos colocados en la carpeta /static/ en mi proyecto se sirven directamente a través de nginx. Pero el archivo json en cuestión no se incluyó en nginx conf de una manera que permitiera que el servidor web lo sirviera.

Una vez que arreglé eso (ver más abajo), nginx sirvió directamente el archivo de manifiesto (y gunicorn nunca entró en el ciclo). ¡Problema resuelto!


Esto es lo que agregué al archivo de host virtual de nginx para resolver el problema: Tenga en cuenta que esto incluye la extensión json:

 location ~* \.(?:ico|css|js|gif|jpg|jpeg|png|svg|woff|ttf|eot|json)$ { root /home/ubuntu/app/my_proj; expires 120d; access_log off; error_log off; }
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!