S
S
saveplanetfree2015-06-03 11:13:15
PHP
saveplanetfree, 2015-06-03 11:13:15

502 Bad Gateway (Nginx + php fpm) and Joomla 3. What's the problem?

Good day.
On one of our projects, we have a bundle on the nginx + phpfpm server as the engine is Joomla.
The site is not available in ie and ff, an error 502 Bad gateway is generated
. It works in other browsers.
+
When we go to site.ru/administrator we enter a wrong password, we also get 502 Bad gateway
nginx config:

server {
    listen          *:443 ssl;
    server_name     site.ru;

    ssl			on;
    ssl_protocols       TLSv1 TLSv1.1 TLSv1.2; # SSLv3 исключить CVE-2014-3566
    ssl_certificate	/etc/nginx/ssl/name.crt;
    ssl_certificate_key	/etc/nginx/ssl/name.key;
    
    server_name_in_redirect off;

    charset utf-8;

 	# Specify log locations for current site
 	access_log /var/www/logs/auto.access.log;
 	error_log /var/www/logs/auto.error.log warn;

  userid log;
  proxy_set_header X-Server $http_x_server;
  proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  proxy_set_header X-Real-IP $remote_addr;
  proxy_set_header  Accept-Encoding  "";
  proxy_set_header Host $host;

    root /var/www/auto;
    
    index index.php index.html index.htm default.html default.htm;
    # Support Clean (aka Search Engine Friendly) URLs
    location / {
            try_files $uri $uri/ /index.php?$args;
    }

    # deny running scripts inside writable directories
    location ~* /(images|cache|media|logs|tmp)/.*\.(php|pl|py|jsp|asp|sh|cgi)$ {
            return 403;
            error_page 403 /403_error.html;
    }

    location ~ \.php$ {
        fastcgi_pass  127.0.0.1:9000;
        fastcgi_index index.php;
        include fastcgi_params;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    }

    # caching of files 
    location ~* \.(ico|pdf|flv)$ {
            expires 1y;
    }

    location ~* \.(js|css|png|jpg|jpeg|gif|swf|xml|txt)$ {
            expires 14d;
    }
}

Clearly a config error.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrey Burov, 2015-06-03
@BuriK666

See nginx logs.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question