Coder Social home page Coder Social logo

docker-nginx-lua's People

Contributors

danday74 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

docker-nginx-lua's Issues

Integrate lua-upstream-module in nginx container

Hi, i've an nginx container used as load balancer, on host port 9200. This is nginx config file:

upstream cdn-audio {
        server 192.168.99.103:9500;
        server 192.168.99.104:9500;
        server 192.168.99.105:9500;
   }

upstream cdn-video {

        server 192.168.99.103:9500;
        server 192.168.99.104:9500;
        server 192.168.99.105:9500;
    }


server {

listen 80;
server_name 172.17.0.1;
access_log /var/log/nginx/acces.log main;

location = /LynyrdSkynyrdFreebirdAudio.mp4 {

#           proxy_pass http://192.168.99.103:9500;

# proxy_pass http://cdn-audio/LynyrdSkynyrdFreebirdAudio.mp4;
add_header X-Upstream  $upstream_addr;
add_header Host $host;
if ($request_method = OPTIONS) {
        add_header Access-Control-Allow-Origin '*';
        add_header Access-Control-Allow-Headers "Authorization,Range";
        add_header Access-Control-Allow-Credentials "true";
        add_header Content-Length 0;
        add_header Content-Type text/plain;
        add_header Host $host;
        return 200;
    }

       return 302 $scheme://cdn-audio/LynyrdSkynyrdFreebirdAudio.mp4;

        }

location = /LynyrdSkynyrdFreebirdVideo.mp4 {

add_header X-Upstream  $upstream_addr;
#  proxy_pass http://cdn-audio/LynyrdSkynyrdFreebirdVideo.mp4;
add_header Host $host;


if ($request_method = OPTIONS) {
        add_header Access-Control-Allow-Origin '*' ;
        add_header Access-Control-Allow-Headers "Authorization,Range";
        add_header Access-Control-Allow-Credentials "true";
        add_header Content-Length 0;
        add_header Content-Type text/plain;
        add_header Host $host;
        return 200;
}


#       proxy_pass http://cdn-video$request_uri;

#       proxy_pass http://192.168.99.103:9500;

       return 302 $scheme://cdn-video/LynyrdSkynyrdFreebirdVideo.mp4;
#       add_header X-Upstream  $upstream_addr;

        }

   }

The point is: when i point to localhost:9200/LynyrdSkynyrdFreebirdVideo(or Audio).mp4, the browser cannot resolve "cdn-audio(or video) name".
With this image, can i solve this problem?
Thanks

Update to latest?

It would be great to see this image updated to latest versions. Right now that looks like

  • Ubuntu 16.04
  • Nginx 1.10
  • Lua nginx module 0.10.7

Lua is stuck at 5.1 though, which is because of lua-nginx-module.

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.