F
F
Fader2015-09-16 22:02:35
Nginx
Fader, 2015-09-16 22:02:35

Please help with Nginx config. Where are the loot?

I get errors in the nginx log like this:

2015/09/16 10:50:52 [error] 26253#0: *10878 FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream, client:109.165.119.0, server: mydomain.com, request: "GET /ajax.php/config/client HTTP/1.1", upstream: "fastcgi://unix:/var/run/php5-fpm.sock:", host: "mydomain.com", referrer: "http://mydomain.com/tickets.php"

nginx config:
server {
        listen 80;
        server_name mydomain.com;

        access_log  /var/log/nginx/ost.access.log;
        error_log   /var/log/nginx/ost.error.log;
.
        root /home/www/mydomain.com;
        index index.php index.html index.htm;
.
        set $path_info "/home/www/mydomain.com";
.
        if ($request_uri ~ "^/api(/[^\?]+)") {
        set $path_info $1;
    }
.
    location ~ ^/api/(?:tickets|tasks).*$ {
        try_files $uri $uri/ /api/http.php?$query_string;
    }
.
        if ($request_uri ~ "^/scp/.*\.php(/[^\?]+)") {
        set $path_info $1;
    }
.
    location ~ ^/scp/ajax.php/.*$ {
        try_files $uri $uri/ /scp/ajax.php?$query_string;
    }
.
        location / {
            try_files $uri $uri/ index.php;
        }
.
        location ~ \.php$ {
            include        fastcgi_params;
            fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
            fastcgi_param  PATH_INFO<-->$path_info;
            fastcgi_index  index.php;
            fastcgi_pass   unix:/var/run/php5-fpm.sock;
        }
    }

where is the loot?
Thank you.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry Skogorev, 2015-09-16
@EnterSandman

https://toster.ru/answer?answer_id=403313#comments...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question