Nginx proxy_pass

Hi there,

I’m attempting to proxy images from a staging site to my local dev site, but am still getting 404 errors on all images. The nginx site.conf details have been tested and work on a vagrant nginx box. This is a multisite, using subdomains.

Thanks for any help!

My site.conf looks like:

server {
    server_name  _;
    return 302 $scheme://$request_uri;

server {
  server_name ~^(.*)\.sitename\.dev$;
  root /app/public/;

  index index.php index.html index.htm;

  # need to change
  # to

  location ~* .(js|css|png|jpg|jpeg|gif|ico|mp3|mov|tif|tiff|swf|txt|html)$ {
    expires 24h;
    log_not_found off;
    try_files $uri $uri/ @production;

  location @production {

    # Site ID 1 on the live site
    if ($host = "") {
      rewrite ^/wp-content/uploads/sites/d+/(.*)$uri;


  include do-not-modify/*.conf;

@verticalgrain I cannot seem to find the site.conf? Can you help me?