0

Does anyone have any tips for setting up communication between NginX and Mono's Fast CGI server over a unix socket?

I have tried starting the server like this:

fastcgi-mono-server4 /appconfigdir=/etc/init.d/mono-fastcgi /socket=unix:/tmp/site.socket /logfile=/var/log/mono/fastcgi.log /multiplex=True /verbose=True /printlog=True &

And set up my nginx config file like this:

    location / {
            auth_basic "Restricted";
            auth_basic_user_file /usr/share/nginx/html/.htpasswd;
            fastcgi_pass unix:/tmp/site.socket;
            include /etc/nginx/fastcgi_params;
    }

I can see that there is a fastcgi process running, but if I browse to the site I get a 502 error which would indicate that NginX doesn't know where to hand off the request to.

Any ideas where I'm going wrong?

Thanks,

Adam

booler
  • 705
  • 1
  • 7
  • 15

1 Answers1

0

As Alexey Ten wrote, make sure the socket can be read from and written to by the nginx user

Alex Mazzariol
  • 2,456
  • 1
  • 19
  • 21