speed - Nginx + pagespeed - images delay
2014-07
I got nginx + pagespeed setuped and I'd like to know, where can be a problem with delivering image from my server.
According to this:
http://tools.pingdom.com/fpt/#!/b2Muem/https://test.nejservery.cz
There is some problem with image delivery - I can't find out why there is long delay between requests - I got domain sharding between three domains to let browser establish more connections but I still can't find why is the slow delivery for that one image happening.
Many many thanks for any suggestion!
David S.
I am posting this here, as apparently, I am unlikely to get any help at raspberry pi. Please bear with me.
I have a small problem with configuring Mercurial to work with nginx using unix sockets on raspberry pi. When accessing http://myip/hg
via web browser, I get 502 Bad Gateway error and error.log displays following error:
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"
I can't seem to figure out what is wrong.
Oh and here is my default web site config:
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;
}
}