server {
	listen 192.168.1.2:80;
	root /var/www/html/ezlogin;

	index index.php index.html index.htm;

	server_name login.898.ro;

        access_log /var/log/nginx/login.898.ro.access.log;
        error_log /var/log/nginx/login.898.ro.error.log notice;

	location / {
		try_files $uri  $uri/ =404;
	}

	error_page 404 /404.html;
	error_page 500 502 503 504 /50x.html;
	
	location = /50x.html {
		root /var/www/html/ezlogin;
	}

	# pass PHP scripts to FastCGI server
	location ~ \.php$ {
		try_files $uri =404;
		#fastcgi_split_path_info ^(.+\.php)(/.+)$;
		fastcgi_pass unix:/var/run/php-fpm.sock;
		fastcgi_index index.php;
		fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;

		fastcgi_buffer_size 128k;
		fastcgi_buffers 4 256k;
		fastcgi_busy_buffers_size 256k;
		include fastcgi_params;
	}

	if (!-f $request_filename) { 
		rewrite ^/(.*)$ /index.php?$1 last;
	}

	# deny access to .htaccess files, if Apache's document root concurs with nginx's one
	location ~ /\.ht {
		deny all;
	}
}
