Nginx – create our first virtual host

I recently posted an entry related to the installation and basic configuration of Nginx web server. In this chapter we will add the configuration of our website to server. This time we will no longer have to install any additional packages in the system or use additional external repositories. Everything is limited to editing existing files and optionally creating new ones – just as in Apache, which includes the configuration of each website. Of course, I’m assuming that you have already installed the Nginx server in accordance with the instructions from the previous chapter. This entry does not concern PHP configuration – this aspect will be discussed in the next chapter.

Continue reading “Nginx – create our first virtual host”

Cyclocross crankset can be better than road crankset

It’s autumn, winter is coming. As a result, I decided to change my 50/34T crankset to cyclocross 46/36T. This change does not seem too great, but it really makes a huge difference. I decided to describe a few of them, because perhaps for someone it may be very important. Primarily with road bike – in my opinion, it’s… better choice for amateurs than standard road cranksets. If the weather allowed, then I was riding on the asphalt with that CX crankset. So what do we gain by changing the road crank (standard 53/39, compact 50/34 or other variants) to cyclocross?

Continue reading “Cyclocross crankset can be better than road crankset”

Nginx – installation and first configuration

I have already created a series of entries related to the configuration of the Nginx server, PHP-FPM and MariaDB database few years ago but all of them were in the Polish and also are currently outdated. I decided to create this series again, this time in English and with all fresh information about this modules and nice “tricks”. This post is first one with Nginx installation and global, standard configuration of this web server. I based on Ubuntu Server (16.04) and repositories for this distrubution. Installation may look different on other systems, but configuration is the same, independent of platform.

Continue reading “Nginx – installation and first configuration”

CX bike as MTB replacement

On few previous entries I promised that I would share my impressions about cyclocross bike as a substitute for a mountain bike. The weather is terrible, today I decided to move my bike into a trainer, so it’s time to describe these impressions. For fast readers: cyclocross bicycle does not behave the same as a mountain bike and will not be able to replace it in any case. If you are looking for comfort or driving in very difficult terrain, you do not have to look for anything here. Okay, now we can go to some more specific description.

Continue reading “CX bike as MTB replacement”

GROUP BY ($group) in MongoDB

Mongodb is not relational database, but we sometimes want to use functions similar from such databases. I wrote about JOINs in Mongo few weeks ago, but it isn’t only one option. Second and very interesting is grouping – something like GROUP BY in for example MySQL database. Do we really need grouping in Mongo? Maybe yes, maybe no, but I must implement such option for one of application modules. It isn’t difficult and we can do this very simply. Again, I will use examples from PHP and mongodb extension for this language – code should be very similar in other languages.

Continue reading “GROUP BY ($group) in MongoDB”