Skip to content

Instantly share code, notes, and snippets.

@eduherraiz
Created June 14, 2015 15:01
Show Gist options
  • Save eduherraiz/9618f2dee94d7876e735 to your computer and use it in GitHub Desktop.
Save eduherraiz/9618f2dee94d7876e735 to your computer and use it in GitHub Desktop.
Nginx thumbor configuration
upstream thumbor {
server 127.0.0.1:8090;
server 127.0.0.1:8091;
server 127.0.0.1:8092;
server 127.0.0.1:8093;
}
server {
listen 80;
server_name thumbor.domain.com;
client_max_body_size 50M;
access_log /var/log/nginx/thumbor-access.log;
error_log /var/log/nginx/thumbor-error.log;
location ~* "^/(..)(..)(.+)?$" {
root /thumbor/path/result_storage/v2/$1/$2;
expires 1M;
error_page 404 = @fetch;
}
location @fetch {
internal;
proxy_pass http://thumbor$request_uri;
}
}
@highoncarbs
Copy link

highoncarbs commented Sep 27, 2020

Hey ! I'm trying to do a simple thumbor setup , my thumbor dir is /home/thumbor
And nginx config is


upstream thumbor  {
    server 127.0.0.1:8000;
    server 127.0.0.1:8001;
    server 127.0.0.1:8002;
    server 127.0.0.1:8003;
}

server {
    listen       80;
    server_name  cdn.domain.org;
    client_max_body_size 10M;

    location / {
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header HOST $http_host;
        proxy_set_header X-NginX-Proxy true;

        proxy_pass http://thumbor$request_uri;
        proxy_redirect off;
    }
}



And I'm running into no upstream found nginx error. Can't find a fix around that , any help would be appreciated . Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment