Posted on Friday 2023.05.12 at 2:14 am in technology
By Ryan McElroy
When upgrading a couple of my servers to the latest Ubuntu, I ran into an issue with my php-based websites, including this one, where I was getting a simple yet inscrutible “File not found.” message instead of the php website.
Digging in, I found a few clues initially:
The latest LTS of ubuntu (only a year old now :-p) had upgraded to PHP 8.1 from PHP 7.4, changing the php-fpm system I use to run these sites in a few ways
Static pages still loaded fine, so nginx was basically working
Eventually, by enabling php-fpm access logging and using this helpful answer, I verified that the issue had something to do with nginx no longer correctly passing the url to php-fpm.
Poking around a bit more and diffing the default 7.4 and 8.1 fpm server files, I found that it turns out that php-fpm 8.1 moved a bunch of config settings that make php work easily into snippets/fastcgi-php.conf. By including this file and removing the fastcgi_index and include fastcgi_params directives, I was able to restore order to my hosted sites.
Not exactly how I wanted to spend Friday morning, but onward! Hopefully this helps someone out there some day.
Posted on Sunday 2021.01.24 at 9:24 pm in food, recipes
By Ryan McElroy
Much to my chagrin, I never wrote down the recipe for the best Chili I ever made, the award-winning “BeLieVe in Heaven” Chili with Buffalo, Lamb, and Veal. Nevertheless, I’ve been using this recipe for a while (since I’ve been in the UK) and it’s a great base to riff off of for a variety of great dishes. It is based on The Best Classic Chili recipe from The Wholesome Dish.
Ingredients
1 tablespoon olive oil
1 large onion (diced)
2 cloves garlic
1 pound ground beef
2 tbsp tomato paste
1 tbsp chili powder
2 tbsp ground cumin
1 tsp salt
1 tsp ground black pepper
(optional) ground cayenne pepper for some heat
1 cup tomato sauce
1 can tomatoes
1.5 cups beef broth
1 can red kidney beans
Method
Add olive oil to a large saucepan over medium-high heat. Warm oil until it shimmers, then add the diced onion. Cook for 5 minutes, stirring occasionally, until the onions are translucent and beginning to brown. Press in the garlic and cook for a minute, then add the meat. Stir the meat to brown it evenly for 5 more minutes.
Add the tomato paste and spices – chili powder, cumin, salt, and pepper(s), and stir these in. Next add the can of tomatoes, the tomato sauce, the beef broth, and the beans.
Lower heat to medium-low, cover the pan, and let simmer for 20 minutes or more. Serve with cheese, nachos, rice, tacos, or whatever you wish. Enjoy.
Variants
It’s easy to riff on this basic recipe for many tasty variants. Try it with sweetcorn, add black beans, or swap in turkey for the beef for other tastes.
I finally bit the bullet and used lets encrypt to get certificates for several of the domains hosted by this server.
It was relatively straightforward in the end — though the program didn’t know how to completely automate the setup I had, the instructions were pretty good and the program was pretty clear in what it was doing.
Posted on Monday 2018.11.19 at 2:00 pm in life, sports
By Ryan McElroy
I realized that I only ever posted this on Facebook, but I wanted to share this here since I have my other Triathlon results here as well.
This was my first Olympic-length triathlon. I did a bit of Swimming training, cycled to work regularly throughout the previous year, and ran mostly during Ultimate frisbee games.
Total Time: 02:56:38. I was quite happy to finish in under 3 hours!
I’ve been poking around the server hosting this site for the last few days and just took the time to upgrade to the latest LTS release of Ubuntu (18.04). Things went smoothly, I think — the only manual intervention required was moving php-fpm from 7.0 to 7.2, which involved only a straightforward copy of the old config files.
Just before the upgrade, I moved to a model of a separate php-fpm instance for each of the sites hosted on this server. Each one is running as it’s own user, so in theory the security guarantees should be much stronger (at most, a single site might be compromised — there should be no way to damage a second site if a first site has a vulnerability).
As always, if you notice anything amiss, please let me know.