January 18, 2013

 

teamcity migration details

On a way of migration of teamcity installation from one server and configuration to another I've bumped into https->http redirection in case of apache reverse-proxy setting under ssl.conf. Teamcity really has this bug not fixed yet (now v.7, bug reported for 5). Summary of places to edit in migration: 1. build-data-dir/config/main-config.xml (rootURL attr) 2. config/server.xml (add to connector:
proxyName="xxxxxx.com"
proxyPort="443"
scheme="https"
secure="true"
Httpd config is of no interest, just as manual says:
<VirtualHost [...]>
LoadModule proxy_module bin/mod_proxy.so
LoadModule proxy_http_module bin/mod_proxy_http.so

ProxyRequests Off
ProxyPreserveHost On
ProxyPass / http://127.0.0.1:8111/
ProxyPassReverse / http://127.0.0.1:8111/

Labels: , , , , , , ,

December 29, 2009

 

apache rewrite for mobile browser

mobile browser detection and redirection using apache:
RewriteEngine On
RewriteCond %{REQUEST_URI} !^/m/.*$
RewriteCond %{HTTP_ACCEPT} "text/vnd.wap.wml|application/vnd.wap.xhtml+xml" [NC,OR]
RewriteCond %{HTTP_USER_AGENT} "acs|alav|alca|amoi|audi|aste|avan|benq|bird|blac|blaz|brew|cell|cldc|cmd-" [NC,OR]
RewriteCond %{HTTP_USER_AGENT} "dang|doco|eric|hipt|inno|ipaq|java|jigs|kddi|keji|leno|lg-c|lg-d|lg-g|lge-" [NC,OR]
RewriteCond %{HTTP_USER_AGENT} "maui|maxo|midp|mits|mmef|mobi|mot-|moto|mwbp|nec-|newt|noki|opwv" [NC,OR]
RewriteCond %{HTTP_USER_AGENT} "palm|pana|pant|pdxg|phil|play|pluc|port|prox|qtek|qwap|sage|sams|sany" [NC,OR]
RewriteCond %{HTTP_USER_AGENT} "sch-|sec-|send|seri|sgh-|shar|sie-|siem|smal|smar|sony|sph-|symb|t-mo" [NC,OR]
RewriteCond %{HTTP_USER_AGENT} "teli|tim-|tosh|tsm-|upg1|upsi|vk-v|voda|w3cs|wap-|wapa|wapi" [NC,OR]
RewriteCond %{HTTP_USER_AGENT} "wapp|wapr|webc|winw|winw|xda|xda-" [NC,OR]
RewriteCond %{HTTP_USER_AGENT} "up.browser|up.link|windowssce|iemobile|mini|mmp" [NC,OR]
RewriteCond %{HTTP_USER_AGENT} "symbian|midp|wap|phone|pocket|mobile|pda|psp" [NC]
RewriteCond %{HTTP_USER_AGENT} !macintosh [NC] #*SEE NOTE BELOW
RewriteRule ^(.*)$ /m/ [L,R=302]

(from ohryan.ca)

Labels: , ,

This page is powered by Blogger. Isn't yours?