ansible-debops-infrastructure

DebOps and Ansible scripts to manage my infrastructure
git clone git://git.erethon.com/ansible-debops-infrastructure
Log | Files | Refs

nginx.yml (2122B)


      1 ---
      2 
      3 nginx__servers:
      4   - name: "{{ jitsi__hostname }}"
      5     acme: True
      6     redirect_to_ssl: True
      7     root: /usr/share/jitsi-meet
      8     options: |
      9       ssi on;
     10       ssi_types application/x-javascript application/javascript;
     11 
     12     location_list:
     13       - pattern: '= /config.js'
     14         options: 'alias /etc/jitsi/meet/{{jitsi__hostname}}-config.js;'
     15       - pattern: '= /external_api.js'
     16         options: 'alias /usr/share/jitsi-meet/libs/external_api.min.js;'
     17       - pattern: '~ ^/(libs|css|static|images|fonts|lang|sounds|connection_optimization|.well-known)/(.*)$'
     18         options: |
     19           add_header 'Access-Control-Allow-Origin' '*';
     20           alias /usr/share/jitsi-meet/$1/$2;
     21       - pattern: '= /http-bind'
     22         options: |
     23           proxy_pass      http://localhost:5280/http-bind;
     24           proxy_set_header X-Forwarded-For $remote_addr;
     25           proxy_set_header Host $http_host;
     26       - pattern: '= /xmpp-websocket'
     27         options: |
     28           proxy_pass http://localhost:5280/xmpp-websocket;
     29           proxy_http_version 1.1;
     30           proxy_set_header Upgrade $http_upgrade;
     31           proxy_set_header Connection "upgrade";
     32           proxy_set_header Host $host;
     33           tcp_nodelay on;
     34       - pattern: '~ ^/([^/?&:''"]+)$'
     35         options: 'try_files $uri @root_path;'
     36       - pattern: '@root_path'
     37         options: 'rewrite ^/(.*)$ / break;'
     38       - pattern: '~ ^/([^/?&:''"]+)/config.js$'
     39         options: |
     40           set $subdomain "$1.";
     41           set $subdir "$1/";
     42           alias /etc/jitsi/meet/{{jitsi__hostname}}-config.js;
     43       - pattern: '~ ^/([^/?&:i''"]+)/(.*)$'
     44         options: |
     45           set $subdomain "$1.";
     46           set $subdir "$1/";
     47           rewrite ^/([^/?&:'"]+)/(.*)$ /$2;
     48       - pattern: '~ ^/([^/?&:''"]+)/http-bind'
     49         options: |
     50           set $subdomain "$1.";
     51           set $subdir "$1/";
     52           set $prefix "$1";
     53           rewrite ^/(.*)$ /http-bind;
     54       - pattern: '~ ^/([^/?&:''"]+)/xmpp-websocket'
     55         options: |
     56           set $subdomain "$1.";
     57           set $subdir "$1/";
     58           set $prefix "$1";
     59           rewrite ^/(.*)$ /xmpp-websocket;