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?
server {
listen 80;
server_name mydomain.com;
rewrite ^/(.*) https://mydomain.com/$1 permanent;
}
server {
listen 443 ssl;
server_name mydomain.com;
ssl_certificate /home/starman/mydomain.com.chained.crt;
ssl_certificate_key /home/starman/mydomain.com.key;
client_max_body_size 20M;
location / {
# Serve static files directly:
if (-f $request_filename) {
expires 30d;
break;
}
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://localhost:5000;
}
}
_______________________________________________
dancer-users mailing list
[email protected]
http://lists.preshweb.co.uk/mailman/listinfo/dancer-users