NGinx is so messed up...

graudeejs said:
So you probably haven't read documentation.
nginx is great web server

What's the issue? I've installed nGinx on Linux in the past with no issues.

Code:
#user nginx nginx;
worker_processes 4;

#error_log /usr/local/www/nginx/error_log info;

events {
	worker_connections 1024;
}

http {
	default_type application/octet-stream;

	client_header_timeout 66m;
	client_body_timeout 66m;
	send_timeout 66m;

	connection_pool_size 1024;
	client_header_buffer_size 128k;
	large_client_header_buffers 4 1024k;
	request_pool_size 512k;

	gzip on;
	gzip_min_length 1100;
	gzip_buffers 4 8k;
	gzip_types text/plain;

	output_buffers 1 3072;
	postpone_output 1460;

	sendfile on;
	tcp_nopush on;
	tcp_nodelay on;

	keepalive_timeout 75 20;

	ignore_invalid_headers on;

	index index.html;
	
	server_tokens off;
	client_max_body_size 10M;
	
	server {
		listen 80;
		server_name my-site-name;

		root /usr/local/www/nginx/;
                location ~ .php$ {
			if (!-f $request_filename) {
			return 404;
			}
                        fastcgi_pass 127.0.0.1:9000;
			include fastcgi.conf;
			fastcgi_intercept_errors on;
			fastcgi_read_timeout 360;
			fastcgi_connect_timeout 360;
			fastcgi_send_timeout 360;
			fastcgi_buffer_size 2048k;
			fastcgi_buffers 8 2048k;
			fastcgi_busy_buffers_size 2048k;
			fastcgi_temp_file_write_size 2048k;
                }

		location / {
        	if ($request_uri ~* (^\/|\.html|\.jpg|\.org|\.png|\.css|favicon\.ico|robots\.txt)$ ) {
          	break;
        	}
        	return 444;
      		}

        	location /phpmyadmin/ {
            		alias       /usr/local/www/phpMyAdmin/;
            		index index.php index.html;
        	}
 
        	location ~ ^/phpmyadmin/(.*\.php)$ {
            		root                /usr/local/www/phpMyAdmin/;
            		fastcgi_pass        unix:/tmp/php-fpm.sock;
            		include             fastcgi_params;
            		fastcgi_param       SCRIPT_FILENAME /usr/local/www/phpMyAdmin/$1;
            		fastcgi_param       DOCUMENT_ROOT /usr/local/www/phpMyAdmin;
        	}
	}
}
 
I think the whole forum would benefit if you would post what the issue was and what you did to fix it and then mark the thread as solved. It makes it easier for other users searching for the same issue you had and not end up with posts that just say 'solved' but no explanation as to how.

Just my 0.02.
 
Probably just had the permissions wrong such that nginx couldn't read the files. That's literally what the response codes mean, anyway.
 
Back
Top