Hi there to everybody.
At our company where we are hosting many online apps, are right now in the process of switching from Apache2 to nginx, however we have some problems with fine-tuning configuration.
For webserver a nginx is used, where requests are being proxied to Tomcat backends, like this:
location / {
proxy_pass http://localhost:8120/uav/;
}
location /um/ {
proxy_pass http://localhost:8120/um/;
}
location /ns/ {
proxy_pass http://localhost:8120/ns/;
}
Regarding the proxies, everything works as expected. Now i need to set up that when comes a request for video file (.mp4), it has to be served from another location (local filesystem) and not through proxy.
A request looks like:
http://our.domain.com/ns/rest/content/video/Video_File.mp4
as you can see, the request goes to /ns/ "subdir", which is proxied by default. Now i need to match that .mp4 extension and deliver it from another source, like /home/videos/Video_File.mp4
I messed around with $request_filename, but didn't work as expected.
Any help is much appreciated.
Thanks and best regards.
At our company where we are hosting many online apps, are right now in the process of switching from Apache2 to nginx, however we have some problems with fine-tuning configuration.
For webserver a nginx is used, where requests are being proxied to Tomcat backends, like this:
location / {
proxy_pass http://localhost:8120/uav/;
}
location /um/ {
proxy_pass http://localhost:8120/um/;
}
location /ns/ {
proxy_pass http://localhost:8120/ns/;
}
Regarding the proxies, everything works as expected. Now i need to set up that when comes a request for video file (.mp4), it has to be served from another location (local filesystem) and not through proxy.
A request looks like:
http://our.domain.com/ns/rest/content/video/Video_File.mp4
as you can see, the request goes to /ns/ "subdir", which is proxied by default. Now i need to match that .mp4 extension and deliver it from another source, like /home/videos/Video_File.mp4
I messed around with $request_filename, but didn't work as expected.
Any help is much appreciated.
Thanks and best regards.