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 have pretty much a stock installation of LEMP on Ubuntu server that I was setting up just to host a few static files.

When setting up PHPNuke just for testing purposes, I noticed that I didn't have GD support installed. I had nginx set up with php5-fpm so ran "apt-get install php5-gd" to install the GD support libraries. After that though, nginx broke. Uninstalling php5-gd didn't fix it either. I get an error 500 in nginx and the error log comes up with the following:

2013/01/23 13:27:45 [debug] 16943#0: *16 http script var: "/index.html"
2013/01/23 13:27:45 [debug] 16943#0: *16 trying to use dir: "/index.html" "/etc/nginx/html/index.html"
2013/01/23 13:27:45 [debug] 16943#0: *16 trying to use file: "/index.html" "/etc/nginx/html/index.html"
2013/01/23 13:27:45 [error] 16943#0: *16 rewrite or internal redirection cycle while internally redirecting to "/index.html", client:, server: localhost, request: "GET$
2013/01/23 13:27:45 [debug] 16943#0: *16 http finalize request: 500, "/index.html?" a:1, c:12
2013/01/23 13:27:45 [debug] 16943#0: *16 http special response: 500, "/index.html?"
2013/01/23 13:27:45 [debug] 16943#0: *16 http set discard body
2013/01/23 13:27:45 [debug] 16943#0: *16 xslt filter header
2013/01/23 13:27:45 [debug] 16943#0: *16 HTTP/1.1 500 Internal Server Error

No idea why this has happened, my config doesn't refer to /etc/nginx/html at all so have no idea why it would be trying to look for files in this directory. Here are my configs:

share|improve this question
oh it just fixed itself when I refreshed it just now. some Houdini shit going on here lol – Alex Powell Jan 23 '13 at 4:56
^ Upvoted due to use of 'Houdini shit' – siliconrockstar Mar 11 '14 at 14:59

just got the same error, basically you need to specify the path to index.html. You probably have something like

try_files /index.html;


try_files $uri/index.html;


try_files /var/www/yourpath/index.html;

you need to change the directory structure to what you have. After that - reload nginx. Make sure you reload the right process :) I had some issues with that after upgrading nginx on ubuntu.

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.