Quantcast
Channel: Nginx Forum - How to...
Viewing all articles
Browse latest Browse all 4759

site.com works site.com/something 502 error

$
0
0
hi,

i have a wordpress blog using nginx/php-fpm/varnish and this situation:

config:

server {
listen 8080;
#listen [::]:80 default_server ipv6only=on;

root /home/xxx/www.site.com;
index index.php index.html index.htm;

# Make site accessible from http://localhost/
server_name www.site.com

# error_page 404 /404.html;
# error_page 500 502 503 504 /50x.html;
# location = /50x.html {
# root /usr/share/nginx/html;
# }
location / {
# This is cool because no php is touched for static content.
# include the "?$args" part so non-default permalinks doesn't break when using query string
try_files $uri $uri/ /index.php?$args;
}
location ~ \.php$ {
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
#fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_pass 127.0.0.1:7777;
fastcgi_index index.php;
include fastcgi_params;
}
location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {
expires max;
log_not_found off;
access_log off;
}
}

when i type www.site.com it is work OK
but when i try www.site.com/my-beautiful-post i have 502 error:

recv() failed (104: Connection reset by peer) while reading response header from upstream

How i can solve this?

thanks

Viewing all articles
Browse latest Browse all 4759

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>