NGINX iRule Example

Tagged: 

  • NGINX iRule Example

    Posted by cowboydenny on March 16, 2025 at 4:18 pm

    Like with F5 LTMs, NGINX can create Rules to direct traffic and here is a quick example of a Rule on NGINX

    listen       443;
    server_name  domain1.com;
    ssl                  on;
    ssl_certificate      path/to/cert;
    ssl_certificate_key  path/to/key;
    ssl_protocols        TLSv1 TLSv1.1 TLSv1.2;
    ssl_ciphers RC4:HIGH:!aNULL:!MD5;
    ssl_prefer_server_ciphers on;
    keepalive_timeout    60;
    ssl_session_cache    shared:SSL:10m;
    ssl_session_timeout  10m;
    location / {
            proxy_pass   http://XX.XX.XX.XX:XX; 
            proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504;
            proxy_set_header        Accept-Encoding   "";
            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 $scheme;
            add_header              Front-End-Https   on;
    }

     

    cowboydenny replied 1 year, 3 months ago 1 Member · 0 Replies
  • 0 Replies

Sorry, there were no replies found.

Log in to reply.

Protected By
Shield Security