# Images are missing in drupal 7 working on nginx

**URL:** <https://www.ruby-forum.com/t/images-are-missing-in-drupal-7-working-on-nginx/202724>\
**Category:** NGINX\
**Created:** [February 4, 2011, 11:52am UTC](https://www.ruby-forum.com/t/images-are-missing-in-drupal-7-working-on-nginx/202724 "2011-02-04T11:52:47Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![luislavena](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/0ea827/32.png) [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Post date:** [February 4, 2011, 11:52am UTC](https://www.ruby-forum.com/t/images-are-missing-in-drupal-7-working-on-nginx/202724/1 "2011-02-04T11:52:47Z")

</div>

I welcome,

I am here new and if I am writing in the bad department I apologise.  
Around drupalem earlier I already had the contact but now already on  
seriously and wants on the base drupal 7 to build the web page. My  
server is VPS with the system ubuntu, I installed server www nginx  
because he is being efficienting very much and here my problem appeared.  
Because images which he is adding aren’t reading carefully to articles.  
After using automatic sending the picture to the server the link to him  
is following:

[http://site.com/sites/default/files/field/image/my\_image\_fakt02022011\_470.jpeg](http://site.com/sites/default/files/field/image/my_image_fakt02022011_470.jpeg)

But already after writing articles the link is following:

[http://site.com/sites/default/files/styles/large/public/field/image/my\_image\_fakt02022011\_470.jpeg](http://site.com/sites/default/files/styles/large/public/field/image/my_image_fakt02022011_470.jpeg)

And he isn’t being shown, and if I write the link of the picture down in  
the browser:

[http://site.com/sites/default/files/styles/large/public/field/image/my\_image\_fakt02022011\_470.jpeg](http://site.com/sites/default/files/styles/large/public/field/image/my_image_fakt02022011_470.jpeg)

Server nginx is giving mistake 404: 404 Not Found nginx/0.8.54. I  
configured nginx according to it: [Drupal | NGINX](http://wiki.nginx.org/Drupal) Perhaps  
somebody had similar probilem and does know how to fix it? I will still  
add that for the keying become integrated of editor wyswig tinymce. On  
lighttpd everything acted well but how I changed the www server on nginx  
then images don’t just work

my real address is replacing sites with [site.com](http://site.com)

I apologise for my weak English very thanks

also my topic on [drupal.org](http://drupal.org): [Images are missing in drupal 7 working on nginx | Drupal.org](http://drupal.org/node/1048570)

Posted at Nginx Forum:

> **[Images are missing in drupal 7 working on nginx](https://forum.nginx.org/read.php?2,172146,172146#msg-172146)**
>
> I welcome, I am here new and if I am writing in the bad department I apologise. Around drupalem earlier I already had the contact but now already on seriously and wants on the base drupal 7 to build the web page. My server is VPS with the system...

---

<div class="post-metadata">

**Author:** ![Dew](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/f9ae1b/32.png) [@Dew](https://www.ruby-forum.com/u/Dew)\
**Post date:** [February 4, 2011, 4:03pm UTC](https://www.ruby-forum.com/t/images-are-missing-in-drupal-7-working-on-nginx/202724/2 "2011-02-04T16:03:50Z")

</div>

## Dew Wrote:

> reading carefully to articles. After using  
> ublic/field/image/my\_image\_fakt02022011\_470.jpeg  
> similar probilem and does know how to fix it? I  
> [Client Challenge](http://drupal.org/node/1048570)  
> The best place to request help with nginx configuration for Drupal is  
> the nginx group at [groups.drupal.org](http://groups.drupal.org). [http://groups.drupal.org/nginx](http://groups.drupal.org/nginx)

There are some sample configs linked at the top of that page, though  
some of those are for Drupal6 and not Drupal7.

In Drupal7, images in the /styles directory have to send their 404s to  
Drupal for creation of alternate images, just like images in /imagecache  
for Drupal6.

Something like:

location ~ ^._/files/styles/._$ {  
access\_log off;  
expires 45d;  
error\_page 404 @drupal;  
}

If you want to post your full config over at [groups.drupal.org/nginx](http://groups.drupal.org/nginx)  
folks will be happy to help.

Posted at Nginx Forum:  
[http://forum.nginx.org/read.php?2,172146,172187#msg-172187](http://forum.nginx.org/read.php?2,172146,172187#msg-172187)

---

<div class="post-metadata">

**Author:** ![Dew](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/f9ae1b/32.png) [@Dew](https://www.ruby-forum.com/u/Dew)\
**Post date:** [February 4, 2011, 5:58pm UTC](https://www.ruby-forum.com/t/images-are-missing-in-drupal-7-working-on-nginx/202724/3 "2011-02-04T17:58:34Z")

</div>

On 4 Fev 2011 16h45 WET, removed\_email\_address@domain.invalid wrote:

I just want to add that Drupal 7 no longer needs the “clean URL  
rewrite” rule.

A simple:

# This implements all Drupal handling. No need for regex magick when

# rewriting. D7 handles that.

location @drupal {  
rewrite ^ /index.php last;  
}

will do.

— appa

---

<div class="post-metadata">

**Author:** ![Dew](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/f9ae1b/32.png) [@Dew](https://www.ruby-forum.com/u/Dew)\
**Post date:** [February 4, 2011, 6:17pm UTC](https://www.ruby-forum.com/t/images-are-missing-in-drupal-7-working-on-nginx/202724/4 "2011-02-04T18:17:25Z")

</div>

## António P. P. Almeida Wrote:

> # rewriting. D7 handles that.
> 
> nginx mailing list  
> [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
> [mailman.nginx.org archive](http://nginx.org/mailman/listinfo/nginx)

clean URL work, only images work not

Posted at Nginx Forum:  
[http://forum.nginx.org/read.php?2,172146,172208#msg-172208](http://forum.nginx.org/read.php?2,172146,172208#msg-172208)

---

<div class="post-metadata">

**Author:** ![Dew](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/f9ae1b/32.png) [@Dew](https://www.ruby-forum.com/u/Dew)\
**Post date:** [February 4, 2011, 5:51pm UTC](https://www.ruby-forum.com/t/images-are-missing-in-drupal-7-working-on-nginx/202724/5 "2011-02-04T17:51:40Z")

</div>

On 4 Fev 2011 10h51 WET, [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> 

[![](https://site.com/sites/default/files/styles/large/public/field/image/my_image_fakt02022011_470.jpeg) ](https://site.com/sites/default/files/styles/large/public/field/image/my_image_fakt02022011_470.jpeg)

> I apologise for my weak English very thanks
> 
> also my topic on [drupal.org](http://drupal.org): [Client Challenge](http://drupal.org/node/1048570)

Like Brian said hop in to the Nginx Drupal group. I would say that you  
seem to miss a location with a fallback to Drupal so that the images  
are (re)generated if they don’t exist.

A rule like Brian indicated is what it takes. You can see my config  
here [GitHub - perusio/drupal-with-nginx: Running Drupal using nginx: an idiosyncratically crafted bleeding edge configuration. · GitHub](https://github.com/perusio/drupal-with-nginx) that contemplates  
drupal 7 or others at the top of the group page:  
[http://groups.drupal.org/nginx](http://groups.drupal.org/nginx)

In general the drupal group is the place to be for Nginx and Drupal  
related issues.

— appa

---

<div class="post-metadata">

**Author:** ![Dew](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/f9ae1b/32.png) [@Dew](https://www.ruby-forum.com/u/Dew)\
**Post date:** [February 4, 2011, 7:34pm UTC](https://www.ruby-forum.com/t/images-are-missing-in-drupal-7-working-on-nginx/202724/6 "2011-02-04T19:34:21Z")

</div>

On 4 Fev 2011 17h15 WET, [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> > # This implements all Drupal handling. No need for
> > 
> > * * *
> > 
> > nginx mailing list  
> > [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
> > [mailman.nginx.org archive](http://nginx.org/mailman/listinfo/nginx)
> 
> clean URL work, only images work not

I’ve never said that. I’ve said that the rule is now is _much  
simpler_.

As per the rest. Bryan’s reply coupled with mine already gave you a  
solution. I’m afraid that isn’t going to be of much help to you if you  
don’t consider your config as a whole and just ask questions about  
snippets without considering the remaining.

Post it here all of ti or at the Drupal Nginx group if you want us to  
help you debugging it.

— appa
