====== Redmine SVN ====== ===== Debian 7 ===== Instalar os pacotes: # apt-get install libapache2-svn libapache-dbi-perl libapache2-mod-perl2 libdbd-mysql-perl libauthen-simple-ldap-perl Copiar o arquivo de configuração do Remine: # mkdir /usr/share/perl/5.14/Apache # cp /usr/share/redmine/extra/svn/Redmine.pm /usr/share/perl/ ==== Apache ==== Habilitar os módulos: a2enmod ssl a2enmod dav a2enmod dav_svn a2enmod dav_fs a2enmod rewrite a2enmod headers Criar o arquivo ''/etc/apache2/conf.d'': # /svn location for users PerlLoadModule Apache::Redmine DAV svn SVNParentPath "/var/www/svn" Order deny,allow Deny from all Satisfy any PerlAccessHandler Apache::Authn::Redmine::access_handler PerlAuthenHandler Apache::Authn::Redmine::authen_handler AuthType Basic AuthName "Projectwerk Subversion Repository" #read-only access Require valid-user # Allow from [my server ip] Allow from 127.0.0.1 # Allow from another-ip Satisfy any # write access Require valid-user ErrorDocument 404 default # sqlconnection RedmineDSN "DBI:mysql:dbname=redmine_default;host=localhost" RedmineDbUser "redmine" RedmineDbPass "xxxx" ====== Redmine ====== ===== Debian 8 ===== Instalando redmine e SGBD: # apt-get install mysql-server # apt-get install redmine redmine-mysql thin Configurando o thin: # thin config --config /etc/thin2.1/redmine.yml --chdir /usr/share/redmine --environment production --socket /var/run/redmine/sockets/thin.sock --daemonize --log /var/log/thin/redmine.log --pid /var/run/thin/redmine.pid --user www-data --group www-data --servers 1 # mkdir -p /var/run/redmine/sockets # chown www-data.www-data /var/run/redmine/sockets Configurando o nginx: **/etc/nginx/conf.d:** upstream redmine_thin { server unix:/var/run/redmine/sockets/thin.0.sock; } **/etc/nginx/sites-available/:** server { listen 80; server_name projetos.tic.ufrj.br; return 301 https://projetos.tic.ufrj.br$request_uri; } server { listen 443 ssl; server_name projetos.tic.ufrj.br; ## Keep alive timeout set to a greater value for SSL/TLS. keepalive_timeout 75 75; access_log /var/log/nginx/redmine.access.log; error_log /var/log/nginx/redmine.error.log; ssl_certificate /etc/ssl/certs/secure.projects.example.com-cert.pem; ssl_certificate_key /etc/ssl/private/perusio.com-key.pem; ## Strict Transport Security header for enhanced security. See ## http://www.chromium.org/sts. add_header Strict-Transport-Security "max-age=7200"; root /usr/share/redmine/public; index index.html; location / { try_files $uri @thin; } ## All static files will be served directly. location ~* ^.+\.(?:css|js|jpe?g|gif|htc|ico|png|html)$ { access_log off; expires 30d; ## No need to bleed constant updates. Send the all shebang in one ## fell swoop. tcp_nodelay off; ## Set the OS file cache. open_file_cache max=3000 inactive=120s; open_file_cache_valid 45s; open_file_cache_min_uses 2; open_file_cache_errors off; } ## Support for favicon. Return an 1x1 transparent GIF if it doesn't ## exist. location = /favicon.ico { expires 30d; try_files /favicon.ico @empty; } ## Return an in memory 1x1 transparent GIF. location @empty { expires 30d; empty_gif; } ## Location location @thin { proxy_http_version 1.1; proxy_set_header Connection ''; proxy_pass http://redmine_thin; } ## Protect .git files. location ^~ /.git { return 404; } } Reiniciar os servidores: # systemctl start thin # systemctl start nginx Fonte: https://github.com/macournoyer/thin/