Archive for Nginx

[emerg] unknown “https” variable 04.03.12

  • Nginx
  • Comments Off on [emerg] unknown “https” variable
  • 0
  • Error :

    Starting nginx: nginx: [emerg] unknown “https” variable
    nginx: configuration file /etc/nginx/nginx.conf test failed

    Solution :

    Edit this file /etc/nginx/fastcgi_params

    Comment out this line

    # fastcgi_param HTTPS $server_https;

    Nginx 502 Bad Gateway 05.02.12

    502 error messages while viewing an php file means nginx is not communicating with php correctly.

    Error log :
    connect() failed (111: Connection refused) while connecting to upstream
    upstream: “fastcgi://127.0.0.1:9000

    From these line it is clear it is not listening to port 9000. Or its listen queue is full.

    Check port 9000 using this command :
    netstat -lnp | grep :9000

    Check is the process running :
    ps auxww | grep php5-cgi