Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

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 use php5 fpm using nginx. but i have a problem.

# debug alias
location /bb/ {
    alias /usr/share/blahblah/;

file on http://mysite.localhost/bb/index.php was not found. but it's still on /usr/share/blahblah/index.php

and this is an error:

*1 FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream
share|improve this question
Have you checked file permissions? Have you checked the nginx/php-fpm error logs? – Grumpy Jan 31 '13 at 21:49
@Grumpy i'v check permission. it's right. – sweb Feb 1 '13 at 8:00

You probably don't want to load that file directly from disk, and instead proxy through fastcgi. In that case, a rewrite of the url is probably more what you're looking for.

share|improve this answer
how can i figure it out. i think when i use alias document root for php fpm it isn't valid. – sweb Feb 1 '13 at 8:01

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.