Configure Nginx Reverse Proxy behind Cloudflare

On reverse proxy server, lets install some basic utilities.

Install nginx

Now create a config file

Add following to the file and save

In above replce following

Next create a self signed SSL certificate for the web site

Restart nginx

At this stage, you can login to cloudflare, point IP of the web site to reverse proxy server IP address.

Show real IP address

When running a site behind reverse proxy, by default, web server shows IP of the revese proxy server instead of real visitor IP. To fix this, you need to configure remoteip module.

On Cpanel server, edit file

Find

Add your proxy server IP after.

Example

VestaCP Update

To update VestaCP server, run

Example

OpenLiteSpeed Change Admin Password

OpenLiteSpeed Binary Installation

You can download latest version of OpenLiteSpeed web server from

https://openlitespeed.org/downloads/

There are 2 download links for each version of OpenLiteSpeed, here we use the binary download. To install verison 1.6.9, run

To start/stop OpenLiteSpeed, use following commands

OpenLiteSpeed control panel available at

Default password for admin user is 123456.

EasyEngine upgrade

Upgrade EasyEngine

To upgrade EasyEngine, run

It is recommended you run this in tmux or screen to avoid disconnection while upgrading.

EasyEngine upgrade

Example

Related Posts

EasyEngine

VirtualBox Ubuntu Shared Folder

Once you shared a folder in VirtualBox with Ubuntu Guest, you need to install VirtualBox Guest additions, this can be done from menu.

Once this is done, in your Guest OS, you will see a CD rom, install the provided software.

Before you can use shared folder, you need to add the user you use to group vboxsf, to do this, run following command in terminal.

$USER is user name of the user you will be using. You can replace it with any user you will be using to access the shared folder.

Ubuntu pure-ftpd reply with unroutable address

On AWS Ubuntu server running pure-ftpd, when i try connecting, i get error

To fix this, run

YOUR_PUBLIC_IP_HERE = Replace with your Elastic IP or Public IP (if you don’t have an Elastic IP).

Restart pure-ftpd

On AWS security groups, you need to open following ports

ispconfig-change-php-version

ISPConfig reset admin password

To reset password for ISPConfig, login to MySQL as root.

if you don’t have MySQL root password, see ISPConfig Find MySQL root password.

Switch to ISPConfig database

To change password, run

Replace NEW_PASSWORD_HERE with your new password.

Git SCM

Git Ignore file Permission (chmod)

Some times when you transfer file to web server, you may need a differnt file permission for files to run in web server, if your code is in git, this make the files marked as modified eventhough file contents are the same. To avoid git checking for file permission (chmod), run following command