danday74 / docker-nginx-lua Goto Github PK
View Code? Open in Web Editor NEWDockerised Nginx with Lua module built from source - see http://wiki.nginx.org/HttpLuaModule#Installation
Dockerised Nginx with Lua module built from source - see http://wiki.nginx.org/HttpLuaModule#Installation
Hi, how to add set-misc-nginx-module to this build.
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
It would be great to see this image updated to latest versions. Right now that looks like
Lua is stuck at 5.1 though, which is because of lua-nginx-module.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.