# Moosefs and cgi

## tczaude

Hi

I have problem with msfcgi

Somebody know how can make config with nginx on localhost. All time i recive bad gatway or nothing. I try make proxy for native init process and second option i make in root for nginx in /usr/share/msfcgi with thhtpd .

First and second don't working and i can't find whats wrong  :Sad: 

BestRegards

----------

## VinzC

Don't take it as a personal attack but it is hard to understand clearly what your issue is and what you tried to do to fix it. I guess English is not your mother tongue and I'd like to kindly suggest you wrote your issue in your mother tongue in your initial post so that users here can clearly figure out what it's all about — a forum moderator will eventually move your message to the appropriate forum/thread. Also make sure to check there's a sub forum in your favourite language. You might want to ask the question there.

As for your issue (I assume you're talking about mfscgiserv, right?) I don't have the answer (I have no experience with nginx) but the 502 error typically means nginx cannot hand off to the appropriate CGI engine. Have you checked moosefs CGI server FAQ? This might help you.

----------

## Hu

tczaude: please post the configuration you used.  Interested parties may be able to fix it more readily than they can reconstruct your environment from your description of what should happen.

----------

## tczaude

Yes my English is terrible...

But i see only on global forum and Chinese is something about this file system.

I read first this links witch You include in post. Some informations i find but is it for Debian/Squezzy

Yes i talking about mfscgiserv

I make some with config and now have 2 points first point with thtpd

thhtpd

 *Quote:*   

> dir=/usr/share/mfscgi
> 
> user=nginx
> 
> logfile=/var/log/thttpd.log
> ...

 

nginx

 *Quote:*   

> server {
> 
>         listen 127.0.0.1;
> 
>         server_name mfs.localhost;
> ...

 

nginx proxy

 *Quote:*   

> proxy_redirect          off;
> 
> proxy_set_header        Host            $host;
> 
> proxy_set_header        X-Real-IP       $remote_addr;
> ...

 

And i retrieve from thttpd this config cgi not found

Second metod i try  make config with init.d script from package

I start with this config 

 *Quote:*   

> 
> 
> # MooseFS HTTP/CGI server configuration.
> 
> # BIND_HOST: local address to listen on
> ...

 

and make proxy from nginx to this port

and i receive bad getaway 

second method base on this

http://contrib.meharwal.com/home/moosefs

----------

