Header Image - FOSS adventures

Solving Permalinks with Nginx Virtual Host file

After reading the initial 3 chapters of the book Nginx HTTP server – Third Edition, I was ready to tackle the permalinks problem again. I started adjusting the nginx.conf file with renewed knowledge. Something interesting happened when I adjusted the server_name to .fossadventures.com and tested the nginx.conf file. The test indicated that this server name was already in use.

I decided to look for additional .conf files in /etc/nginx. And then found the culprid in the vhosts.d folder. This xxx.conf file contained the configuration of my website. I created a copy “xxx2.conf” and started editing it according to the solution described in my last post. Why not try to create a more pleasing 404 page as well? I copied the Cannyon theme its 404.php page into a separate directory and put the directive to this error page in my xxx.conf file.

Then I stopped Nginx, renamed the current xxx.conf file into xxx.conf.back and renamed xxx2.conf into xxx.conf. After restarting Nginx, my site finally showed pretty permalinks. And best of all, when someone puts in an invalid url, they will see a pretty 404 error page.

Published on: 3 April 2018

Breaking my WordPress website with Permalinks and Nginx

My first challenge is setting up my WordPress website correctly. I have ordered the e-book “WordPress Visual Step by Step for Beginners 2018” by Alvin Wells. The book is 103 pages in length and contains the basic instructions for setting up a WordPress site. It is practical enough to get started.

Before my adventure started, I had already looked at various WordPress themes. I decided on the Cannyon theme, as it featured a good looking green color scheme. That’s a solid basis for a website focused on openSUSE. The theme has a very nice layout for the blog section, with attractive use of images and a simple navigation structure. As the blog is the most important part of this website, this theme seemed to be a good choice. I designed the website to my liking and wrote my first blog post.

Back to the e-book. What’s next? The settings tab and how to change the permalink appearance. The default was set to “Plain” and I wanted to change this to “Post name”. I changed the setting, reloaded the website and tried to access my first post. A 404 error. Then I read the sentence: “Just make sure that you don’t go jumping between link structures since it will break your site”. Oh, snap!

So how to fix it? Google to the rescue. Soon enough I found the generally accepted answers (1), (2) and (3). I just needed to edit my nginx.conf file to include the following within the server block:

location / {
                try_files $uri $uri/ /index.php?$args;

Was this the solution? I changed the permalink settings, reloaded the website… and no luck. A couple of hours and many variations later… and still no luck. I realized that I needed to improve my Nginx skills to get this problem resolved. I am not the person to give up that easily. After all, this website is a learning experience. I ordered the book: “Nginx HTTP Server: Third Edition” by Clément Nedelcu. It’s a fascinating read so far (if you like to dive deep into technology). In a future blog post, I will detail if I have managed to solve this problem and how I have solved it.

Published on: 19 March 2018

The start of an adventure!

I have been a long fan and user of openSUSE. This started in 2009, when I first got a job in ICT and thought that it was a good time to switch to Linux. openSUSE was my choice because a German Linux distribution had a feeling of high quality (like German cars). In the following years I learned to love all the technical decisions that were made by the openSUSE project. I started to learn more and more about Linux and Open Source software. I visited events such as FOSDEM, I watch openSUSE videos on Youtube and in 2015 I went to the openSUSE conference in Den Haag, the Netherlands.

  • I have always wondered how I could contribute back. I knew that it would be a contribution to openSUSE.
  • I have always wanted to create my own website, but I did not have a good idea what to do with it.

Sometimes I help my family members by giving them instructions on how to do things with their openSUSE systems. Like changing wallpapers, using Rapid Photo Downloader, using Darktable, using Kdenlive, et cetera. And I make LibreOffice documents with screenshots and instructions on how to do things. I always wondered why there are so many resources about Ubuntu and not about openSUSE. There are some helpful pages on openSUSE.org, but lots of them are dated. And most of the time, really basic things do not get addressed. Like how to change a wallpaper. So this is where I have gotten my idea to start a website about openSUSE. I want it to be a website that I can update every week or so. With small articles on how to do things. I will also use it to discuss/celebrate new releases. This way I can help people to discover openSUSE and the great open source applications that are out there.

Published on: 26 February 2018