tl;dr If you’re trying to configure nginx on Elastic Beanstalk to redirect http requests to https, here’s what I learned. During deployment, the nginx configuration for your app is located at this file path: /tmp/deployment/config/#etc#nginx#conf.d#00_elastic_beanstalk_proxy.conf via Using a container command, you can edit that nginx configuration file right before it gets deployed. I used a… Continue reading Making the Correct Insanely Difficult
Tag: linux
Or: How I Learned to Stop Worrying and Love the Memory Leak
I received a “high memory usage” alert. Already panicking, I logged into New Relic and saw this terrifying graph: That’s a graph of memory usage, starting from when the server was created. For the uninitiated, when memory usage grows and grows and grows like that, chances are very, very high that you’ve got a nasty… Continue reading Or: How I Learned to Stop Worrying and Love the Memory Leak
Using watch with a bash alias
I love the Unix watch command. On OSX, you can install it easily with Homebrew: brew install watch Something I didn’t realize until 10 minutes ago is that if you want to watch the output of something in your bash aliases, watch will complain because it cannot find the command. This is because watch evaluates… Continue reading Using watch with a bash alias
Fixing Node.js v0.8.2 Build on Linux
There’s a nasty gcc bug on RedHat (RHEL 6) and CentOS Linux (and related) that gets triggered when you try to build Node.js v0.8.2: pure virtual method called. Solution: Run make install CFLAGS+=-O2 CXXFLAGS+=-O2 instead of just make install. More info: Cannot compile node.js 0.8.2 under CentOS 6.2 “make install”: terminate called without an active… Continue reading Fixing Node.js v0.8.2 Build on Linux
FreeNX with Fedora 8
Just finished installing Fedora 8 on one of my machines, only to find that one of my favorite tools, FreeNX (a VNC-like remote desktop protocol), would not work. Turns out Fedora 8 ships with a known bug. More info here. PITA.
Resolution of trouble with CentOS 4 + PHP 5.1 + Zend Optimizer
I have a server running CentOS 4.4 updated with the PHP 5.1.6 from the testing repository. When I tried to install Zend Optimizer 3.0.2, I ran into this problem: Failed loading [path]/ZendOptimizer. so: [path]/ZendOptimizer. so: undefined symbol: match Then, when I tried to downgrade and install Zend Optimizer 3.0.1, I ran into this problem: Failed… Continue reading Resolution of trouble with CentOS 4 + PHP 5.1 + Zend Optimizer
Bash script: ted
I just wrote a little bash script, “ted” (for Tracking EDitor), which I am loving. You call ted like you would call your usual text editor, and ted backs up the file you’re editing, appending the originial timestamp as a suffix. Then, when you’re done editing the file, ted runs diff to keep a running… Continue reading Bash script: ted