Tag: Nginx
-
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]; } }}}