Apache-Talk @lexa.ru 

Inet-Admins @info.east.ru 

Filmscanners @halftone.co.uk 

Security-alerts @yandex-team.ru 

nginx-ru @sysoev.ru 


   


   


   















      :: nginx-ru
Nginx-ru mailing list archive (nginx-ru@sysoev.ru)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

FYI: apache2 + svn + nginx



 ,

          ,  how to   (   
nginx-0.1.32):

apache/vhosts.d/vhosts.conf:

        NameVirtualHost 127.0.0.1:80

        <VirtualHost 127.0.0.1:80>
                ServerName svn.domain.org
                
                ...

                <Location /repo>
                        DAV svn
                        SVNPath /var/svn/repo
                        AuthType Basic
                        AuthName "Subversion repository"

                        AuthUserFile /var/svn/repo/conf/svnusers
                        Require valid-user
                </Location>

                ...

        </VirtualHost>          

nginx.conf:

        server {
                listen whateverICanListenFor:443;

                server_name svn.domain.org;

                ssl on;
                ssl_certificate /etc/apache2/ssl/server.crt;
                ssl_certificate_key     /etc/apache2/ssl/server.key;

                location / {
                        # to avoid 502 Bad Gateway:
                        # 
http://vanderwijk.info/Members/ivo/articles/ComplexSVNSetupFix
                        set $destination $http_destination;

                        if ($destination ~* ^https(.+)$) {
                                set $destination http$1;
                        }

                        # beware: this will drop any inherited 
proxy_set_header's
                        proxy_set_header Destination $destination;
                        proxy_set_header Host $host;
                        proxy_set_header X-Real-IP $remote_addr;

                        proxy_pass http://localhost/;
                        proxy_redirect http://localhost/ 
https://svn.domain.org/;
                }
        }

-- 
voxus
:wq





 




Copyright © Lexa Software, 1996-2009.