GithubHelp home page GithubHelp logo

Comments (3)

vozlt avatar vozlt commented on August 21, 2024

To customize after the module installed

  1. You need to change the {{uri}} string to your status uri in status.template.html as follows:

    shell> vi share/status.template.html
    
    var vtsStatusURI = "yourStatusUri/format/json", vtsUpdateInterval = 1000;
    
  2. And then, customizing and copy status.template.html to server root directory as follows:

    shell> cp share/status.template.html /usr/share/nginx/html/status.html
    
  3. Configure nginx.conf

      server {
          server_name YOURDOMAIN;
          root /usr/share/nginx/html;
    
          # Redirect requests for / to /status.html
          location = / {
              return 301 /status.html;
          }
    
          location = /status.html {}
    
          # Everything beginning /status (except for /status.html) is
          # processed by the status handler
          location /status {
              vhost_traffic_status_display;
              vhost_traffic_status_display_format json;
          }
      }
    
  4. Access to your html.

    http://YOURDOMAIN/status.html
    

To customize before the module installed

  1. Modify share/status.template.html (Do not change {{uri}} string)

  2. Recreate the ngx_http_vhost_traffic_status_module_html.h as follows:

    shell> cd util
    shell> ./tplToDefine.sh status.template.html > ../src/ngx_http_vhost_traffic_status_module_html.h
    
  3. Add the module to the build configuration by adding
    --add-module=/path/to/nginx-module-vts

  4. Build the nginx binary.

  5. Install the nginx binary.

from nginx-module-vts.

centminmod avatar centminmod commented on August 21, 2024

Cheers @vozlt used your 2nd method as outlined https://community.centminmod.com/posts/14182/

from nginx-module-vts.

Lecyd avatar Lecyd commented on August 21, 2024

==≠========≠=============
Please give an example that explain the customisation process

from nginx-module-vts.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.