Deploy Django in Sub-Directory behind uWSGI and NGINX on CentOS 7
It took me awhile to deploy Django in sub-directory. Actually, I move it from sub-domain to sub-directory. I hope this post will save you some hours searching the Internet. Prerequisite or situation You are running Django in sub-domain, another domain and you want to move it to a sub-directory. You’re properly having issue with urlpatterns […]
Web Server (VPS) Optimization Checklist for WordPress
I have been using VPS as web server since 2005 to host my sites. Before that, I switched among shared web hosting for many reasons. One of them is cost efficiency because I have more than one websites (using WordPress). I also want to try some thing else like Django, Flask which I cannot do […]
Setup Django behind uWSGI and NGINX on CentOS 7
Setting up a web server for Django could be challenging and headache. Let’s try to make it simple: Django behind uWSGI and NGINX on CentOS 7 from scratch. At the end, our complete stack of components will look like this: the web client <-> the web server <-> the socket <-> uwsgi <-> Django 1. Install […]
Building a secured Java web server using Spark framework and Nginx
Spark framework (www.sparkjava.com) is a small Java framework used to build a REST server quickly. You can build a Java web server with only a few lines of code. But adding SSL to your server needs more effort. Java used its own format for the keystore file which contains keys. First of all, you need […]
Self-signed certificate for local HTTPS connection
When setting up an HTTPS server for development purpose, you probably don’t want to buy a certificate. However you still need to run with HTTPS locally to develop/test if your web application works under HTTPS connections. You can create a self-signed certificate for free using OpenSSL. Generate a private key This command is to genetate a 4096-bit […]
Compile Nginx with Pagespeed Module From Source
Compile Nginx with Pagespeed Module From Source is not hard as you may think. Below NGINX setup is fit for NGINX + FastCGI Cache. It means you don’t have to use WP Super Cache or W3 Total Cache or any cache plugin. Basic Setup Keep CentOS 7 up to date Disable Root access Firewall Timezone configuration […]
Setup LEMP Stack Centos 7 + NGINX + MariaDB + PHP 7 from Scratch
Believe me or not, there are hundred ways to setup web server. I searched and tried many of them on a VPS with 512MB of RAM. Most of them had issue with database, MySQL or MariaDB was die again and again. This one has worked for me for more than a year: CNMP (Centos 7 + NGINX […]