Estou postando isso aqui, pois, aparentemente, é improvável que eu consiga ajuda no raspberry pi . fique comigo.
Eu tenho um pequeno problema com a configuração do Mercurial para trabalhar com o nginx usando sockets unix no raspberry pi. Ao acessar http://myip/hg
via navegador da web, recebo o erro 502 Bad Gateway e error.log exibe o seguinte erro:
connect() to unix:/srv/hg/mercurial.sock failed (111: Connection refused) while connecting to upstream, client: myPCIP, server: localhost, request: "GET /hg/ HTTP/1.1", upstream: "fastcgi://unix:/srv/hg/mercurial.sock:", host: "myServerIP"
Eu não consigo descobrir o que está errado.
Ah, e aqui está minha configuração padrão do site:
server {
#listen 80; ## listen for ipv4; this line is default and implied
#listen [::]:80 default_server ipv6only=on; ## listen for ipv6
root /usr/share/nginx/www;
index index.html index.htm;
# Make site accessible from http://localhost/
server_name localhost;
# mercurial setup
location /hg {
root /srv/hg/;
auth_basic "Secure Login";
auth_basic_user_file /srv/hg/hgusers;
fastcgi_pass unix:/srv/hg/mercurial.sock;
fastcgi_param SCRIPT_FILENAME /srv/hg/$fastcgi_script_name;
fastcgi_param PATH_INFO $uri;
fastcgi_param REMOTE_USER $remote_user;
fastcgi_param DOCUMENT_ROOT /srv/hg/;
include fastcgi_params;
client_max_body_size 20M;
fastcgi_param QUERY_STRING $query_string;
fastcgi_param REQUEST_METHOD $request_method;
fastcgi_param CONTENT_TYPE $content_type;
fastcgi_param CONTENT_LENGTH $content_length;
}
location / {
# First attempt to serve request as file, then
# as directory, then fall back to displaying a 404.
try_files $uri $uri/ =404;
# Uncomment to enable naxsi on this location
# include /etc/nginx/naxsi.rules
}
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
location ~ \.php$ {
try_files $uri =404;
fastcgi_pass php5-fpm-sock;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_intercept_errors on;
include fastcgi_params;
}
}