Skip to content
Snippets Groups Projects
proxy-hosts.conf.j2 438 B
Newer Older
  • Learn to ignore specific revisions
  • ngyimesi's avatar
    ngyimesi committed
    server { # simple reverse-proxy
    
    ngyimesi's avatar
    ngyimesi committed
        server_name  {{ full_hostname }};
        root /var/www/html;
    
        index index.html;
    
        error_page 400 401 402 403 404 500 501 502 /index.html;
    
        {% set cnt = 253 %}
        {% for i in range(cnt) %}
        location /{{ i + 1 }} {
              return 302 /{{ i + 1 }}/;
        }
    
        location /{{ i + 1 }}/ {
          proxy_pass      http://192.168.69.{{ i + 1 }}:80/;
        }
        {% endfor %}
      }