PureDevOps Community

Connect() failed (111: Connection refused) while connecting to upstream

I’m experiencing 502 Gateway errors when accessing a PHP file in a directory (http://example.com/dev/index.php )

Start php-fpm and add the following to nginx.conf , in the http context:

server {
    server_name localhost;

    error_log /var/log/nginx/localhost.error_log info;

    root /var/www/localhost/htdocs;

    location ~ \.php$ {
        include /etc/nginx/conf.d/*.conf;
        include /etc/nginx/sites-enabled/*;

        fastcgi_intercept_errors        on;
        error_page 404 /error/404.php;