Nginx proxy with ssl

Discussion of the Web Interface for Transmission, formerly known as Clutch. This applies to all version of Transmission
Post Reply
isparavanje
Posts: 1
Joined: Sat Feb 26, 2011 6:07 am

Nginx proxy with ssl

Post by isparavanje »

Hi all, I am trying to setup a reverse proxy on my Nginx server for transmission, so that I can have encrypted traffic. However, I am unable to do so, as I keep getting blocked by the session ID. My nginx configuration is as follows:

Code: Select all

user nginx nginx;
user nginx nginx;
worker_processes 1;

error_log /var/log/nginx/error_log info;

events {
	worker_connections 1024;
	use epoll;
}

http {
	include /etc/nginx/mime.types;
	default_type application/octet-stream;

	log_format main
		'$remote_addr - $remote_user [$time_local] '
		'"$request" $status $bytes_sent '
		'"$http_referer" "$http_user_agent" '
		'"$gzip_ratio"';

	client_header_timeout 10m;
	client_body_timeout 10m;
	send_timeout 10m;

	connection_pool_size 256;
	client_header_buffer_size 1k;
	large_client_header_buffers 4 2k;
	request_pool_size 4k;

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

	output_buffers 1 32k;
	postpone_output 1460;

	sendfile on;
	tcp_nopush on;
	tcp_nodelay on;

	keepalive_timeout 75 20;

	ignore_invalid_headers on;

	index index.html;

	#server {
	#	listen 127.0.0.1;
	#	server_name localhost;

	#	access_log /var/log/nginx/localhost.access_log main;
	#	error_log /var/log/nginx/localhost.error_log info;

	#	root /var/www/localhost/htdocs;
	#}

	# SSL example
	server {
		listen 443;
		server_name localhost;

		ssl on;
		ssl_certificate /etc/ssl/nginx/nginx.pem;
		ssl_certificate_key /etc/ssl/nginx/nginx.key;

		access_log /var/log/nginx/localhost.ssl_access_log main;
		error_log /var/log/nginx/localhost.ssl_error_log info;

		root /var/www/localhost/htdocs;

		location = /transmission {
			rewrite /transmission/(.*) /$1 break;
			proxy_headers_hash_max_size 1024;
			proxy_headers_hash_bucket_size 128;
			proxy_set_header	Host		$http_host;
			proxy_set_header	X-Real-IP	$remote_addr;
			proxy_set_header	X-Forwarded-For	$proxy_add_x_forwarded_for;
			proxy_pass 		http://127.0.0.1:9091/transmission/web/;
			proxy_redirect		off;
		}	
	}
}

Is it possible to allow Nginx to pass the session ID, or to disable the session ID without compiling? Any help is much appreciated!

Update: I have gotten past the 409 error. However, now the page loads up, but is non-functional as the page is unable to find anything.
Example of error in Nginx error log:

Code: Select all

2011/02/26 15:14:32 [error] 17834#0: *8 open() "/var/www/localhost/htdocs/stylesheets/common.css" failed (2: No such file or directory), client: 192.168.1.1, server: localhost, request: "GET /stylesheets/common.css HTTP/1.1", host: "xxx.xxx.xxx", referrer: "https://xxx.xxx.xxx/transmission"
Post Reply