NameVirtualHost *:80 NameVirtualHost *:8090 NameVirtualHost *:443 NameVirtualHost *:8443 # Default virtual host. Must be defined first ServerName xxxxxxx.com Redirect / https://xxxxxxxxx.com/ ServerName localhost ServerAlias 127.0.0.1 # Added 10/02/2015 SetHandler server-status # End Add ServerName xxxxxxxxx.com DocumentRoot /var/www/html/ ErrorLog /var/log/httpd/svn_error_log CustomLog /var/log/httpd/svn_access_log combined Include /product/rhodecode/.rccontrol/enterprise-1/mod_dav_svn.conf # This is the first SSL vhost defined and will catch all requests ServerName xxxxxxxxxxxxx.com DocumentRoot /var/www/html/ SSLEngine on SSLCertificateFile /etc/httpd/keys/xxxxxxxxxxxxx.crt SSLCertificateKeyFile /etc/httpd/keys/xxxxxxxxxxx.key ErrorLog /var/log/httpd/svn_s_error_log CustomLog /var/log/httpd/svn_s_access_log combined Include /product/rhodecode/.rccontrol/enterprise-1/mod_dav_svn.conf # This is the first SSL vhost defined and will catch all requests # # with unknown names, like https://10.0.0.0/ ... ServerName xxxxxxxxxxxxxxxxxx.com SSLEngine on SSLCertificateFile /etc/httpd/keys/xxxxxxxxxxx.crt SSLCertificateKeyFile /etc/httpd/keys/xxxxxxxxxxx.key Redirect / https://xxxxxxxxxxx.com/ SSLEngine on # Add line for increase the max header size - jmmazzoc # LimitRequestFieldSize 200000 SSLCertificateFile /etc/httpd/keys/xxxxxxxxxxx.crt SSLCertificateKeyFile /etc/httpd/keys/xxxxxxxxxxx.key ServerName xxxxxxxxxxx.com DocumentRoot /var/www/html/ ## Skip ProxyPass the _static to backend server ProxyPass /_static ! ProxyPass /hg/_static ! ## serve static files by Apache, recommended for performance Alias /_static/rhodecode /product/rhodecode/.rccontrol/enterprise-1/static Alias /hg/_static/rhodecode /product/rhodecode/.rccontrol/enterprise-1/static ## Allow Apache to access the static files in this directory AllowOverride none Require all granted ########################## # SVN repositoty (bserant) ########################## #Include /product/rhodecode/.rccontrol/enterprise-1/mod_dav_svn.conf ProxyPreserveHost On # Default global Timeout is already 86400 in conf/httpd.conf #ProxyTimeout 86400 # To avoid "proxy: error reading status line from remote server" SetEnv proxy-initial-not-pooled 1 SetHandler balancer-manager # Added 10/02/2015 # modified 18/06/2019 SetHandler server-status # Order Deny,Allow Order Allow,Deny # Deny from all # Allow from 10.10.148.185 Allow from 10.60.240.142 # End Add # Start of new config BalancerMember http://localhost:4001 max=1 BalancerMember http://localhost:4002 max=1 ProxySet maxattempts=3 lbmethod=bybusyness Allow from all RewriteEngine On # The next rule is like 'Alias /redmine /product/redmine/redmine/public' except it is executed _right now_ RewriteRule ^/redmine2(.*) /product/redmine2/current/redmine/public$1 # If URL looks like /redmine[...] _and_ does not map to a file, forward it to Redmine RewriteCond %{REQUEST_URI} ^/redmine2(.*) RewriteCond %{REQUEST_FILENAME} !-f RewriteRule . balancer://redmine2_app/redmine2%1 [P,L] # Otherwise Apache will serve the file normally. # end of new config RequestHeader set X_FORWARDED_PROTO 'https' ## Redmine3 ## # Start of new config BalancerMember http://localhost:6001 max=1 BalancerMember http://localhost:6002 max=1 ProxySet maxattempts=3 lbmethod=bybusyness Allow from all RewriteEngine On # The next rule is like 'Alias /redmine /product/redmine/redmine/public' except it is executed _right now_ RewriteRule ^/redmine3(.*) /product/redmine3/current/redmine/public$1 # If URL looks like /redmine[...] _and_ does not map to a file, forward it to Redmine RewriteCond %{REQUEST_URI} ^/redmine3(.*) RewriteCond %{REQUEST_FILENAME} !-f RewriteRule . balancer://redmine3_app/redmine3%1 [P,L] # Otherwise Apache will serve the file normally. # end of new config RequestHeader set X_FORWARDED_PROTO 'https' ## Redmine ## # start of old config # # BalancerMember http://localhost:3001 max=1 # BalancerMember http://localhost:3002 max=1 # ProxySet maxattempts=3 lbmethod=bybusyness # Allow from all # # # Alias /redmine /product/redmine/redmine/public # # # if file doesn't exists, it's a command passed to Redmine # RewriteEngine On # RewriteCond %{LA-U:REQUEST_FILENAME} !-f # RewriteRule ^/redmine(.*) balancer://redmine_app/redmine$1 [P,L] # old of old config # Start of new config BalancerMember http://localhost:3001 max=1 BalancerMember http://localhost:3002 max=1 ProxySet maxattempts=3 lbmethod=bybusyness Allow from all RewriteEngine On # The next rule is like 'Alias /redmine /product/redmine/redmine/public' except it is executed _right now_ RewriteRule ^/redmine(.*) /product/redmine/current/redmine/public$1 # If URL looks like /redmine[...] _and_ does not map to a file, forward it to Redmine RewriteCond %{REQUEST_URI} ^/redmine(.*) RewriteCond %{REQUEST_FILENAME} !-f RewriteRule . balancer://redmine_app/redmine%1 [P,L] # Otherwise Apache will serve the file normally. # End of new config RequestHeader set X_FORWARDED_PROTO 'https' # Apply "good practice" (as per Yahoo and Google recommendations) on Redmine's static assets. max-age in seconds (30 days) Header unset ETag Header set Cache-Control "max-age=2592000, public" ## **************** RHODECODE ****************** ## BalancerMember http://localhost:5000 max=360 retry=0 ProxySet timeout=15 maxattempts=3 Allow from all # if file doesn't exists, it's a command passed to Rhodecode RewriteEngine On RewriteCond %{LA-U:REQUEST_FILENAME} !-f #RewriteRule /hg/_static/rhodecode(.*) /product/rhodecode/.rccontrol/enterprise-1/static$1 [L] RewriteRule ^/hg(.*) balancer://rhodecode_app/hg$1 [P,L] # indicate to paster to generate https URL RequestHeader set X-Url-Scheme https ## LOGS ## ErrorLog /var/log/httpd/error_log CustomLog /var/log/httpd/access_log combined DocumentRoot /var/www/html ErrorLog /var/log/httpd/svn_error.log CustomLog /var/log/httpd/svn_access.log combined