314f2f3fd2
- nginx.conf: eliminar text/html de gzip_types (duplicado con default de nginx) - compose: webroot apunta a /var/volumes/web_jailgames directamente - compose: conf nginx montada como jailgames.conf (no default.conf) para evitar que el entrypoint la sobreescriba al arrancar - healthcheck: usar pgrep nginx en lugar de wget (más fiable) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
35 lines
859 B
Nginx Configuration File
35 lines
859 B
Nginx Configuration File
server {
|
|
listen 80;
|
|
server_name localhost;
|
|
|
|
root /usr/share/nginx/html;
|
|
index index.html;
|
|
|
|
# Compresión para HTML/CSS/JS
|
|
# text/html ya está incluido por defecto en nginx, no repetir
|
|
gzip on;
|
|
gzip_types text/css application/javascript application/json image/svg+xml;
|
|
gzip_min_length 256;
|
|
|
|
# Cacheo para assets estáticos (feria local)
|
|
location ~* \.(png|jpg|jpeg|gif|svg|ico|webp)$ {
|
|
expires 7d;
|
|
add_header Cache-Control "public, immutable";
|
|
}
|
|
|
|
# Descargas: forzar descarga en lugar de abrir en navegador
|
|
location /downloads/ {
|
|
add_header Content-Disposition "attachment";
|
|
sendfile on;
|
|
tcp_nopush on;
|
|
}
|
|
|
|
# Rutas limpias
|
|
location / {
|
|
try_files $uri $uri/ $uri.html =404;
|
|
}
|
|
|
|
# Página 404 personalizada
|
|
error_page 404 /404.html;
|
|
}
|