Nginx proxy basic configuration for Wildfly/JBoss

We are going to explain how to configure a nginx proxy to redirect wildfly port 8443 to 443 and redirect requests from application context path to domain name. The following basic configuration it goes in http context and the base file without can be downloaded here. This file is created on /etc/nginx/conf.d/wildfly-basic.conf with following command […]

MariaDB using time zones

We are going to explain how to install and use Time zones with MariaDB on Ubuntu. Install on Ubuntu Convert to sql and import to MariaDB Time zone data are in /usr/share/zoneinfo and is found as binaries. To use Time zones with MariaDB we need to convert to sql. Now we have the zoneinfo.sql file […]

Programming principles

Any fool can write code that a computer can understand. Good programmers write code that humans can understand. Martin Fowler, 2008 Bad code comes in many ways. Variables that don’t make sense or inconsistent naming, messy code, massive if-else chains, illegible formatting, hard to mantain, lack of tests, low cohesion, high coupling… If you want to be a programmer, don’t settle for shortcuts […]

Wildfly 10 https redirection

In Wildfly server can we redirect request from http to https through the undertow subsystem (standalone.xml or domain.xml). In standalone.xml or domain.xml files To do this redirection we need to create a filter to rewrite url. Once the filter is created, create the filter reference to configure a predicate that decides when the filter will […]

Maven behind a proxy

1. Proxy configuration To configure basic proxy in maven we have to edit the file settings.xml in our ‘<user_home>/.m2’ directory. If there is no file, we can copy it from the global settings folder ‘<maven_home>/conf’. We can define an <id> to the proxy to change between proxies, and deactivate our original entry by setting <active> […]

HTTPS Redirection

In Apache In your Apache server and go to the conf folder and take a backup of httpd.conf file. Open httpd.conf using your favourite editor. Ensure mod_rewrite.so module is loaded. LoadModule rewrite_module modules/mod_rewrite.so If you see above line is commented then uncomment it. Add the following at the end of the file. RewriteEngine On RewriteCond %{HTTPS} off RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} Restart […]