nginx PHP won't display -


i have website stored in /usr/share/nginx/html .gave 777 directories , files.when fire-up browser , navigate website, downloads page rather displaying it. php-fpm installed , running

this /etc/nginx/conf.d/default.conf

server { listen       80; server_name  hostedweb.net;  #charset koi8-r; #access_log  /var/log/nginx/log/host.access.log  main;  location / {     root   /usr/share/nginx/html;     index  index.php index.htm; }  #error_page  404              /404.html;  # redirect server error pages static page /50x.html # error_page   500 502 503 504  /50x.html; location = /50x.html {     root   /usr/share/nginx/html; }  # proxy php scripts apache listening on 127.0.0.1:80 # #location ~ \.php$ { #    proxy_pass   http://127.0.0.1; #}  # pass php scripts fastcgi server listening on 127.0.0.1:9000 # 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; }  # deny access .htaccess files, if apache's document root # concurs nginx's 1 # #location ~ /\.ht { #    deny  all; #} 

}

i'm on centos 6 appreciated

in location ~ \.php$ { try adding include fastcgi_params;

also in php portion try taking out root html; portion, or try setting root /usr/share/nginx/html;

have tried removing or commenting out fastcgi_param script_filename /scripts$fastcgi_script_name;? don't have line in of nginx config files , seem work fine.


Comments

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -