NGINX + Subversion + HTTPS and 502 Bad Gateway error

Mario Gazzo mario.gazzo at
Mon Dec 15 17:30:12 MSK 2008


Could only find one entry about this on the NGINX mailinglist but  
without any answer, so maybe there is someone who can help me with  
this. I get the following svn error when I try to create a branch:

"svn: Server sent unexpected return value (502 Bad Gateway) in  
response to COPY request"

After googling around there was some indications that this could be  
related to running subversion over https behind a reverse proxy  
although I must admit that I am not entirely sure about this. I have a  
subversion server running under Apache with WebDAV and NGINX in front  
as a https reverse proxy. Below you will find an example of my NGINX  
configuration. I am still running version NGINX 0.7.19. Maybe its just  
some configuration stuff missing. Any help would be much appreciated.


worker_processes  1;

events {
     worker_connections  1024;

http {
     include    mime.types;
     include    proxy.conf;
     default_type  application/octet-stream;

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

	access_log   logs/access.log	main;

     sendfile        on;
     keepalive_timeout  65;

     upstream subversion_hosts {

     server {
         listen 443;

		ssl    on;
		ssl_certificate    /etc/ssl/certs/mydomain-ssl.crt;
		ssl_certificate_key     /etc/ssl/private/mydomain-ssl.key;

         location /myproj/repos {
         	proxy_pass http://subversion_hosts;

More information about the nginx mailing list