Administrador
Tamaño: 2.06 KB
Modificado: 2026-05-26 18:29:21
Permisos: 100664
Ruta: /home/apps/radmin/nginx/sites-enabled/rello
Contenido del Archivo
# HTTP server redirecting to HTTPS
# Load balancing settings
upstream app_rello {
server 127.0.0.1:3004;
}

server {
    listen 80;
    server_name rello-r42.gvn.mx;
    
    location /.well-known/pki-validation/ {
        root /home/apps/rello/public;
    }
    
    location / {
        # Redirigir a HTTPS si hay certificados SSL
        return 301 https://$host$request_uri;
    }
}

 # HTTPS server (certificados SSL disponibles)
server {
    listen 443 ssl http2;
    server_name rello-r42.gvn.mx;

    ssl_certificate /etc/letsencrypt/live/astrasgs.com/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/astrasgs.com/privkey.pem;
    
    ssl_protocols TLSv1.2 TLSv1.3;
    ssl_prefer_server_ciphers on;
    ssl_ciphers HIGH:!aNULL:!MD5;

    root /home/apps/rello/public;
    index index.html index.htm;

    client_max_body_size 50M;

    location / {
        try_files $uri/index.html $uri.html $uri @rello_app;
    }

    location ~* ^.+\.(jpeg|png|jpg|gif|ico|zip|tgz|gz|rar|bz2|doc|xls|exe|pdf|ppt|txt|tar|mid|midi|wav|bmp|rtf|mp3|flv|mpeg|avi)$ {
        try_files $uri @rello_app;
    }

    location ~ \.php$ {
      include snippets/fastcgi-php.conf;
      root /home/apps/rello/php;
      include fastcgi_params;
      index index.htm index.html;

      fastcgi_pass unix:/run/php/php5.6-fpm.sock;
      fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    }


    location @rello_app {
        proxy_pass http://127.0.0.1:3004;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto https;
        proxy_set_header X-Forwarded-Ssl on;

        # Timeout settings
        proxy_connect_timeout 60s;
        proxy_send_timeout 60s;
        proxy_read_timeout 60s;
        send_timeout 60s;

        # Buffer size settings
        proxy_buffer_size 128k;
        proxy_buffers 4 256k;
        proxy_busy_buffers_size 256k;
        proxy_temp_file_write_size 256k;
    }

    location ~ /\.ht {
        deny all;
    }
}