Nginx – [emerg] unknown “server_https” variable

Recently I got this error when starting nginx on Ubuntu:

[emerg] unknown “server_https” variable

In my case I do these step:

– edit /etc/nginx/fastcgi_params

– comment this code:

fastcgi_param HTTPS                   $server_https;

413 Request Entity Too Large

you have set necessary PHP configuration to accept large file upload but still get this error. This error is thrown by Nginx, to resolve just set the client_max_body_size variable  the server block, the size should be in Megabytes. eg:

client_max_body_size 200M;


A Little Note Everytime My Nginx has Problem

nginx reads request from client to a big buffer, then connect to a free fastcgi server process, sent the whole buffer to it. Then, fastcgi process queries the database in a very short time, and send the result to a buffer of nginx, then go on sleeping. Actually, the time of a cycle of fastcgi working should be as short as possible.


Nginx for Windows Buggy Path Setting (Kevin Worthington Port)

nginx bases the root directory into the hardcoded path

even if you don't have Cygwin installed
There is a workaround, though, to use relative directory paths:

    location / {
        root   ../www;

This will get you the root directory set to c:\www, if nginx lives in C:\nginx.

to download cygwin version of nginx visit:

thanks kevin for stopping by :)