NGINX Redirect Tutorial

We recently assigned a few custom domains to rampages. That ended up causing two complications. The first was that some people were using https associated URLs previously (news to me). The always impressive Tim Owens (reclaim hosting support cannot be complimented enough) took care of that for me. @twoodwar Merry Christmas 🙂 #vcualtlab pic.twitter.com/fpT7AQjt2I — Tim Owens (@timmmmyboy) June 16, 2016 The second was the need to redirect some file level1 URLs to some new subdomains. I plain English, I needed https://uc.vcu.edu/focused-inquiry/ to go to http://focusedinquiry.vcu.edu. In any case, Tim gave me some tips and I sallied forth to do the redirects.2 This was my first time doing anything in NGINX so it was a learning experience. I document the steps here in the hope that it’ll be useful to someone else. Keep in mind I’ve only done this on my server so I’m assuming it’s fairly broadly applicable but I can’t be sure of that. I also attempted to either explain or link to things that might be helpful to beginners (like myself). Enter Terminal Land Launch Terminal. I’m using iTerm thanks to Mark Luetke. I’m using a pem file to authenticate which is nice. Read more about pem authentication here. Do keep in mind you need your pem file permissions to be -rw—— (400 I think) even on […]

No More Temptations

sudo nano /etc/hosts http://facebook.com http://www.facebook.com sudo dscacheutil -flushcache That chunk of code run sequentially (don’t cut/paste it all at once) in terminal on the Mac kills all access to Facebook. I did it because I was finding myself drawn back to wrestling with pigs. I’m not sure Bernard Shaw said it but I remember my dad saying something similar growing up. When people post stuff from Prager U . . . it’s hard to resist but I’m trying to be smarter about my time and energy. I’ve sworn never to engage in a serious conversation on facebook before . . . but was finding it hard to resist in this case. Thus the full iron door of an edited host file was instituted. You might try it and see how often you find yourself going to a page without really thinking.