Redirect site from www to non-www
It is better to make web site available with one URL. Many sites work with both wwww and non-www (naked
Show Real IP Nginx Behind Reverse Proxy
When your Nginx web server is running behind a reverse proxy, you will see IP of the reverse proxy server
Install Nginx on CentOS 8
To install Nginx web server on CentOS 8, create repo Add Install nginx with dnf or yum Open HTTP and
Redirect HTTP to HTTPS when using Reverse Proxy
When you are using Reverse Proxy like Nginx, Haproxy or Amazon ELB in front of web server and web server
Nginx Location Directive
Nginx Location Directive is used to route request to correct files. Match Exact match is used to match an exact
Nginx Password Protect a website
To password protect a web site, you need to install htpasswd utility. On Ubuntu/Debian, you can install it with command
Nginx vs Apache
I recently added nginx as front end for apache. Now nginx serve static content, PHP requests are peroxided to Apache.
Configure Nginx to listen on single IP Address
By default Nginx listens on all IP address on a server. To make nginx listen on specific IP address, edit
Running Python Application with gunicorn and nginx
Create a service file for gunicorn Here /home/ubuntu/myapp/wagtail2 = path to the folder where web application is. /home/ubuntu/myapp/venv/bin/gunicorn = is
Nginx Config for Laravel Application in sub folder
To run Laravel Application on sub folder of a web site, use following configuration. If you run Laravel application as
Nginx Config for Laravel Application
Here is Nginx configuration for a laravel application Nginx Config for Laravel Application in sub folder
Nginx Rails Origin header didn’t match request.base_url
After installing SSL on Nginx server, rails application login page stopped working. On log file (log/production.log), found following error HTTP