Tag Archives: NGINX

NGINX: IP Geolocation by Cloudflare and “nested” if conditions

2 April 2022

Among other features provided by Cloudflare, it can add a special header with a country value, from where a visitor came. As a Ukrainian, I’d like to ban all visitors from russia, but: redirect all visitors from russian IPs to another web domain – russki-voenny-korabl-idi-nahuy.com during this, I’d like to filter requests and leave requests… Read More »

Kubernetes: NGINX/PHP-FPM graceful shutdown and 502 errors

25 February 2021

We have a PHP application running with Kubernetes in pods with two dedicated containers – NGINX и PHP-FPM. The problem is that during downscaling clients get 502 errors. E.g. when a pod is stopping, its containers can not correctly close existing connections. So, in this post, we will take a closer look at the pods’… Read More »

Linux: LEMP set up – NGINX, PHP, MySQL, SSL, monitoring, logs, and a WordPress blog migration

6 November 2020

Finally got time to migrate the RTFM.CO.UA blog to a new server with Debian 10. This time manually, without any automation will set up a LEMP stack Wrote a similar at 2016 – Debian: установка LEMP — NGINX + PHP-FPM + MariaDB (Rus), but in time the post is more complete of the process and… Read More »

Nextcloud: running in Docker Compose on Debian with Let’s Encrypt SSL

30 November 2019

I while ago I’d tested the Nextcloud, see the NextCloud: installing server on Debian behind NGINX with PHP-FPM and client on Arch Linux post. In general, it looks good, so it’s time to try to run in a production environment and finally migrate from Dropbox to it. Today, let’s spin up a Nextcloud instance using… Read More »

HTTP: redirects, POST and GET requests, and the “lost” data

23 November 2019

We have a web application which has to accept POST-requests from clients. In front of this application, there is some proxy service, no matter which – initially, we faced the issues on an AWS’s Application Load Balancer, then I reproduced them with NGINX, and it will “work” for any other proxying system. Besides proxying –… Read More »

NGINX: limit_req – limiting requests per IP

9 August 2019

The next task is to set a limit per one IP to our backend’s API: add requests limiter on the /user/oauth/refresh_token URI set limit to 5 requests/minute from one IP if the limit is reached – return 429 Too Many Requests response Will use NGINX ngx_http_limit_req_module. limit_req_zone To make limiting works firs need to create… Read More »

NGINX: multi-branch deployment with Ansible, NGINX map and HTTP Headers

26 June 2019

We have a standard LEMP setup NGINX, PHP-FPM. Application – Yii-framework, deployed from Jenkins using Ansible role with the synchronize module on backend hosts in a /data/projects/prjectname/frontend/web,  directory which is set as a root for an NGINX virtual host. The task is to have the ability to deploy the same application on the same backend… Read More »

Bitwarden: an organization’s password manager self-hosted version installation on an AWS EC2

1 May 2019

We consider Bitwarden as a passwords keeper for our project with the main goal to have an ability to have separated access to secrets by user roles and/or ACLs. I.e. Pass or KeePass are good for self-usage by one person but they have no main things – a normal web-interface and role-based access to data.… Read More »

JetBrains Upsource: installation, configuration on Linux with NGINX and SSL and PyCharm integration

2 April 2019

Upsource is a self-hosted service from JetBrains for code reviews by teams of developers which can be integrated with any IDE from JetBrains. Is a Java-based application with Apache Cassandra as a backend for storing data and indexes. Minima requirements – 8 GiB memory on a host – not surprise at all. Up to 10… Read More »

TestRail: QA Test Case Management installation on Linux

22 March 2019

TestRail – Test Case Management Software for QA and Development Teams. Well – that’s all needed as a description) Below – its installation on Debian Linux with NGINX, Let’s Encrypt, PHP-FPM, MariaDB, and Exim. Project’s homepage – www.gurock.com/testrail Installation official documentation – here>>>. Setup will be on an AWS EC2. LEMP and SSL Login to… Read More »