Nginx configuration - sharetronix

i try to setup sharetronix on my vps server, with nginx + php5-fpm. The
problem is (maybe) my nginx configuration, when i try to view website, i
get
error 404 - No input file specified.

My configuration (at last)

server {
root /var/www/sharetronix.example;
server_name sharetronix.example www.sharetronix.example;
location / {
    if (!-e $request_filename) {
        rewrite ^(.*)$ /index.php?$request_uri break;
    }
    fastcgi_pass unix:/var/run/php5-fpm.sock;
    fastcgi_split_path_info ^(.+\.php)(/.*)$;
    include fastcgi_params;
    fastcgi_param SCRIPT_FILENAME 

$document_root$fastcgi_script_name;
fastcgi_param HTTPS off;
}
error_log /var/log/nginx/sharetronix.example.error.log;
access_log /var/log/nginx/sharetronix.example.access.log;
}

but error log show this

2014/11/02 06:40:59 [error] 18235#0: *3 FastCGI sent in stderr: "PHP

message: PH P Warning: Unknown: failed to open stream: Success in
Unknown on
line 0 Unable to open primary script: /var/www/sharetronix.example/
(Success)" while rea ding response header from upstream, client:
85.130.69.179, server: share.z-latko .info, request: “GET / HTTP/1.1”,
upstream: “fastcgi://unix:/var/run/php5-fpm.so ck:”, host:
“sharetronix.example”

Posted at Nginx Forum:

Bump* :slight_smile:

Posted at Nginx Forum:

On Mon, Nov 03, 2014 at 01:40:33AM -0500, Replace wrote:

Hi there,

i try to setup sharetronix on my vps server, with nginx + php5-fpm. The
problem is (maybe) my nginx configuration, when i try to view website, i get
error 404 - No input file specified.

What request do you make, and what response do you expect?

I suspect that you want fastcgi_index (Module ngx_http_fastcgi_module)
in your config to handle requests that end in “/”.

Note that many php applications work with an nginx config that does not
use “if” inside “location”; instead they use “try_files”. That maybe
worth considering, after you get the basic part working.

Good luck with it,

f

Francis D. [email protected]

omg :slight_smile: i try again (i think)
location / {
try_files $uri /index.php?$query_string;
}
and everything work fine. I can’t believe not tryed this before :slight_smile:
many, many thanks @Francis D.

Posted at Nginx Forum: