Welcome! Log In Create A New Profile

Advanced

Nginx Serving Static files Issue

Posted by rejoycherian 
Nginx Serving Static files Issue
September 03, 2018 03:11AM
Hi,

I am using nginx to server my application static files. I'm currently using the alias option. But we have a requirement to limit this nginx static files server to certain origin requests for ex: serve only to those requests from xyz.com.

I have achieved this in my application block. But not able to do it for static files, i have used the same option if condition for alias, but it doesn't work. Any workarounds are appreciated.

Thanks,
Rejoy

/app

if(condition)
{
proxy_pass http://myapp;
}
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 183
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready