Z
Z
zordon13ru2013-04-11 13:16:37
Nginx
zordon13ru, 2013-04-11 13:16:37

fastcgiqt + nginx

Does anyone have experience linking fastcgiqt with nginx?
What worked for me was just running the fastcgiqt application as HTTP (not -FCGI-TCP or FCGI-UNIX) on port 9010 and proxying through proxy_pass:

 server {
                listen 127.0.0.1:80;
                server_name lolhost;
                location /fias {
                        proxy_pass http://127.0.0.1:9010/;
                        proxy_set_header   X-Real-IP $remote_addr;
                        proxy_set_header   Host $http_host;
                        proxy_set_header   X-Forwarded-For $proxy_add_x_forwarded_for;

                }
...

but as soon as in the settings I put
 server {
                listen *:80;

location ceases to "respond" and control is transferred to root.
Please tell me how to set up fastcgiqt to start as fast-cgi and not as an http proxy, or how to set up nginx to properly proxy, the code listens *: 80 and on 127.0.0.1: 80

Answer the question

In order to leave comments, you need to log in

5 answer(s)
Z
zordon13ru, 2013-04-11
@zordon13ru

Thanks for the help. I sort of figured out the hosts.
but with fastcgi_pass it doesn’t work ...
if you use fastcgi_pass , here are the values ​​\u200b\u200bthat the fastcgiqt application gives out:

location /fias {
                        fastcgi_pass 127.0.0.1:9010;
                        include fastcgi.conf;
}

when accessing lolhost/fias/lol
Root URL:
    http://lolhost/fias/lol
Location URL:
    http://lolhost/fias/lol
Full URL:
    http://lolhost/fias/lol? 

When I use proxy_pass
    location /fias {
                        proxy_pass http://127.0.0.1:9010/;
                        proxy_set_header   X-Real-IP $remote_addr;
                        proxy_set_header   Host $http_host;
                        proxy_set_header   X-Forwarded-For $proxy_add_x_forwarded_for;  
  }

when accessing lolhost/fias/lol
Root URL:
    http://lolhost
Location URL:
    http://lolhost//lol
Full URL:
    http://lolhost//lol

In the second case, the processing is correct, in the first it is not. I can make an assumption that the Root URL is not formed correctly.
Can anyone tell me how to correctly specify fastcgi_param for fastcgi so that urls are formed as with proxy_pass from the above example?

A
Andrey Burov, 2013-04-11
@BuriK666

Do you have more Server sections?

server_name lolhost ;

Z
zordon13ru, 2013-04-11
@zordon13ru

Yes, I think we need to contact the developer of the fastcgiqt library directly , maybe he will provide the config ...

Z
zordon13ru, 2013-04-11
@zordon13ru

here is a look at the sources how the RootUrl is formed

case RootUrl:
                        {
                                const int pathInfoLength = rawValue(ServerData, "PATH_INFO").length();
                                QByteArray basePath = rawValue(ServerData, "REQUEST_URI");
                                basePath.chop(queryStringLength + pathInfoLength);
                                url.setEncodedPath(basePath);
                                break;
                        }

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question