This commit is contained in:
Lizandro Guarnizo
2026-01-29 11:40:04 -05:00
parent 1e936be593
commit 44423adb32
8 changed files with 146 additions and 145 deletions
+15 -6
View File
@@ -5,6 +5,11 @@ server {
root /var/www/html;
index index.php index.html;
# 🚫 CACHE DESACTIVADO GLOBALMENTE
add_header Cache-Control "no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0" always;
add_header Pragma "no-cache" always;
add_header Expires "0" always;
# Security headers
add_header X-Frame-Options "SAMEORIGIN" always;
add_header X-Content-Type-Options "nosniff" always;
@@ -79,10 +84,12 @@ server {
access_log off;
}
# Static assets caching
# Static assets - SIN CACHE para desarrollo
location ~* \.(jpg|jpeg|png|gif|ico|css|js|svg|woff|woff2|ttf|eot)$ {
expires 30d;
add_header Cache-Control "public, immutable";
# CACHE DESACTIVADO
add_header Cache-Control "no-store, no-cache, must-revalidate, max-age=0" always;
add_header Pragma "no-cache" always;
expires off;
access_log off;
}
@@ -105,10 +112,12 @@ server {
alias /var/www/html/uploads/;
autoindex off;
# Security: solo permitir ciertos tipos de archivo
# Security: solo permitir ciertos tipos de archivo - SIN CACHE
location ~* \.(jpg|jpeg|png|gif|pdf|doc|docx|xls|xlsx|mp4|mp3|webp)$ {
expires 7d;
add_header Cache-Control "public";
# CACHE DESACTIVADO
add_header Cache-Control "no-store, no-cache, must-revalidate, max-age=0" always;
add_header Pragma "no-cache" always;
expires off;
}
# Denegar ejecución de PHP en uploads
+3 -3
View File
@@ -51,9 +51,9 @@ http {
client_header_timeout 12;
send_timeout 10;
# FastCGI cache (opcional)
fastcgi_cache_path /var/cache/nginx levels=1:2 keys_zone=whatsapp_cache:10m
max_size=100m inactive=60m use_temp_path=off;
# FastCGI cache DESACTIVADO para desarrollo
# fastcgi_cache_path /var/cache/nginx levels=1:2 keys_zone=whatsapp_cache:10m
# max_size=100m inactive=60m use_temp_path=off;
# Include virtual hosts
include /etc/nginx/http.d/*.conf;
+3 -2
View File
@@ -1,7 +1,8 @@
# Configuración SSL para bot.u-s.app
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
listen 443 ssl;
listen [::]:443 ssl;
http2 on;
server_name bot.u-s.app localhost;
root /var/www/html;
index index.php index.html;