Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've been trying to get a domain from shared hosting to my new VPS.

Everything was working just 100% fine, and then all of a sudden rewrites stopped working, pictures that should work started returning 404s. I've got no idea why, but for some reason on my site: only the home page works, all the other pages depend on rewrites which were working perfectly fine at one stage, but all of a sudden stopped working. Some of the pictures like this url: which doesn't use a rewrite throws a 404?

I almost certain it was nothing to do with the nginx configuration.

I've got suspicions that it could be something to do with php5-fpm?

The funny thing is, all of a sudden it started working again. And then an hour or so later it broke again and has now gone back to only displaying the home-page and all of the links (and some of the pictures) are just showing 404s.

Does anyone have an idea of what the problem might be? I'm pretty new to the whole Linux VPS thing, but this just seems very strange.


Here's a line from the error log which might shed some light on the problem:

2011/02/06 03:04:59 [error] 2873#0: *220 open() "/usr/local/nginx/html/bgsPreview/Matthew-8.10.jpg" failed (2: No such file or directory), client:, server:, request: "GET /bgsPreview/Matthew-8.10.jpg HTTP/1.1", host: "", referrer: ""

I wonder why it's trying to find the file in /usr/local/nginx/html instead of the proper root which is /var/www/ etc...

Oh, and for some reason it's just started working again... for how long I don't know.

Another thing that was a bit weird, is that the pages on my website are pulled from a database. But when I edited the database, the pages didn't change... It's almost like they've been cached or something.

share|improve this question
What does your webserver's error log say about these errors? – DerfK Feb 6 '11 at 3:26
Well, there's tons of stuff in the error log (/var/log/nginx/error.log). Here's one of the problem lines I think: 2011/02/06 03:04:59 [error] 2873#0: *220 open() "/usr/local/nginx/html/bgsPreview/Matthew-8.10.jpg" failed (2: No such file or directory), client:, server:, request: "GET /bgsPreview/Matthew-8.10.jpg HTTP/1.1", host: "", referrer: "" – Emmanuel Feb 6 '11 at 3:32
Ah, I wonder why it is trying to open /usr/local/nginx/html/... instead of the proper root which is /var/www/ etc.... – Emmanuel Feb 6 '11 at 3:33
Oh, by the way It's started working again :(, but I don't know how long it will stay up for. – Emmanuel Feb 6 '11 at 3:34
up vote 0 down vote accepted

Problem Solved! Turned out it was an issue with Nameservers or something coming through from the old hosting account... Still quite weird. But It seems to be working fine now.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.