<div dir="ltr">I have the following nginx configuration that I believe -- or at least hope -- serves up my static files, like images ad videos, directly without invoking my dancer app. Can anyone tells me if this is the case or not, or how I can test to see if they are indeed being served directly by NGINX?<br><div><br><div class="">server {</div>
<div class=""> listen 80;</div>
<div class=""> server_name <a href="http://mydomain.com">mydomain.com</a>;</div>
<div class=""> rewrite ^/(.*) <a href="https://mydomain.com/$1">https://mydomain.com/$1</a> permanent;</div>
<div class=""> }</div>
<div class=""> </div>
<div class="">server {</div>
<div class=""> listen 443 ssl;</div>
<div class=""> server_name <a href="http://mydomain.com">mydomain.com</a>;</div>
<div class=""> ssl_certificate /home/starman/mydomain.com.chained.crt;</div>
<div class=""> ssl_certificate_key /home/starman/mydomain.com.key;</div>
<div class=""> client_max_body_size 20M;</div>
<div class=""> </div>
<div class=""> location / {</div>
<div class=""> </div>
<div class=""> # Serve static files directly:</div>
<div class=""> if (-f $request_filename) {</div>
<div class=""> expires 30d;</div>
<div class=""> break;</div>
<div class=""> }</div>
<div class=""> </div>
<div class=""> proxy_set_header X-Forwarded-Proto $scheme;</div>
<div class=""> proxy_set_header Host $http_host;</div>
<div class=""> proxy_set_header X-Forwarded-Host $http_host;</div>
<div class=""> proxy_set_header X-Real-IP $remote_addr;</div>
<div class=""> proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;</div>
<div class=""> proxy_pass <a href="http://localhost:5000">http://localhost:5000</a>;</div>
<div class=""> }</div>
<ol class=""><div class=""> }</div></ol><br></div></div>