Tag: Apache

  • Performance Metrics – Apache vs Nginx

    We just deployed [[http://wiki.nginx.org/Main|Nginx]] as a forward proxy for our production server. Before deploying, we took some page load benchmarks so that we could get an idea of what we improved with this change. The benchmarking was a simple python script that opened 100 concurrent threads (3 times to spot outliers) to a list of […]

  • Fix incorrect client IP for WordPress behind reverse proxy

    If you are running WordPress behind a reverse proxy, you will need to add the below code to the top of `wp-config.php`: {{{ // Alter `REMOTE_ADDR` header to `HTTP_X_FORWARDED_FOR` if it exists. if($_SERVER[‘HTTP_X_FORWARDED_FOR’]) { $xaddr = explode(‘,’,$_SERVER[‘HTTP_X_FORWARDED_FOR’]); $_SERVER[‘REMOTE_ADDR’] = $xaddr[0]; } }}}

  • Setup Trac w/ multiple projects, mod_wsgi, LDAP & MySQL – Ubuntu 12.10

    [[[TOC]]] —– = Installation = {{{ sudo apt-get install -y apache2 libapache2-mod-python python-setuptools python-genshi mysql-server python-mysqldb easy_install a2enmod #< Base Packages sudo apt-get install -y libapache2-mod-wsgi #< WSGI support sudo apt-get install -y subversion #< Subversion (not covering the config) sudo easy_install trac #< Trac }}} ------------ = Prep MySQL = * Log in {{{ […]

  • Apache Reverse Proxy w/ URL Rewrite & REMOTE_USER Header

    Here is a sample Location block for setting up Apache as an authentication proxy for a remote Trac install. It sets a REMOTE_USER header so that Trac does not need to worry about authentication, and rewrites the URL for the remote URL Schema. {{{ lang=xml line=1 RewriteEngine On #< Allows Rewritin the URL with regexes […]