2

I have very few experience in configuring servers and stuff, so I'am totally lost in this.

I tried to add php support to a nginx installation, but when a put this in nginx.conf.

location ~ \.php$ {
        root           html;
        fastcgi_pass   127.0.0.1:9000;
        fastcgi_index  index.php;
        fastcgi_param  SCRIPT_FILENAME  /scripts$fastcgi_script_name;
        include        fastcgi_params;
    }

and the I tried to restart, I have this error message

 [emerg]: unknown directive "fastcgi_pass" in /opt/nginx/conf/nginx.conf:67

Any clue?

Thanks in advance

PD:

nginx -V output nginx version: nginx/0.7.67 built by gcc 4.1.2 20080704 (Red Hat 4.1.2-48) --prefix=/opt/nginx --without-http_fastcgi_module --without-http_memcached_module --without-mail_pop3_module --without-mail_imap_module --without-mail_smtp_module --with-http_flv_module --add-module=../nginx_mod_h264_streaming-2.2.7 --without-http-cache

2
  • could you provide your full nginx.conf file and nginx version?
    – imaximchuk
    Jan 24, 2011 at 16:29
  • You need to recompile Nginx to include the fastcgi module. Jan 24, 2011 at 22:12

2 Answers 2

6

can you show nginx -V output?

it seems that nginx was built without fastcgi support (--without-http_fastcgi_module)

0

check this: "--without-http_fastcgi_module"

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .