29 Jan

Basic Access Authentication with Kloxo-MR for NGINX

Often when you are doing development on a new site you want to protect the site from outside eyes and especially from bots prematurely crawling the site. A popular way to do this is to through basic access authentication. Or forcing user to enter username and password before being able to access the site.

With Kloxo-MR you can added and removed from the NGINX config through its control panel. Just follow the steps below to easily add restrictions to your site.

Adding Restrictions

  • Find Domain
  • Find Button
  • Choose Directory
  • Create Credentials

Find Domain you want to add restriction to.

Click on "All" Button
Click on domain

Find “Protected Directories” button

Find Protected Directories Button

Add the restriction name and directory.

Choose Directory

Add username and password

Choose Restriction
Put in user & password

Removing Restrictions

Find the permission within domain and delete

Deleting Permissions


If for some reason either adding or deleting your basic access authentication doesn’t work. Then you will want to test NGINX config and then restart NGINX. You can do this as well through Kloxo-MR command center.
These are the commands to use.

/usr/sbin/nginx -t
/etc/init.d/nginx restart
  • Test NGINX Config
  • Restart NGINX

Test NGINX configuration before restarting. Make sure there are no errors before proceeding further.

/usr/sbin/nginx -t
Testing NGINX Config

Restart NGINX.

/etc/init.d/nginx restart
Restarting NGINX
Share this
29 Jan

Adding SSL Certificate into Kloxo-MR Control Panel for NGINX

Kloxo-MR is a branch of Kloxo that supports NGINX  to a small extent.  We add onto this compatibility with our own version focused on our VPS and Dedicated server configurations and supported software. This means that you can now add SSL certificates through Kloxo without having to understand NGINXconfigurations.

Below are a few screenshots of how to add a new certificate you have already purchased from a third party vendor.  Make sure you have the following files available from the SSL provider.

  • SSL Private Key
  • Certificate Bundle

Install Certificate

  • Find SSL Area
  • Paste in SSL Certificate
  • Assign SSL to IP
  • Assig SSL to domain

Find SSL certificate area in Kloxo-MR

Find SSL certificate area in Kloxo-MR

Paste in SSL Certificate

Paste in SSL Certificate

Assigning SSL certificate to IP

Assigning SSL certificate to IP

Assigning SSL certificate to domain

Assigning SSL certificate to domain

Restart NGINX

Hopefully this clarifies how to add an SSL certificate into Kloxo-MR. You will probably want to restart NGINX afterwards, here is how to do it in a safe manner. You will need to copy and paste the following commands into your Kloxo-MR command center.

  • Test Config
  • Restart NGINX

Test NGINX configuration before restarting. Make sure there are no errors before proceeding further.

/usr/sbin/nginx -t
Test NGINX configuration

Restart NGINX

service nginx restart
Restart NGINX

After restarting NGINX check that there aren’t certificate errors in your browser on https pages.  Then you can test the SSL certificateinstallation on your favorite Certificate testers here is a link to one we use frequently. SSL-Shopper

Share this
16 Mar

NGINX 413 (Request Entity Too Large) error

If you have files that need to be downloaded from your site that are larger than 64M, our default setting, then you will need to adjust client_max_body_size in order to allow for larger file downloads.
To know if your hitting this error you can search the NGINX error logs for 413 errors similar to the following.

Failed to load resource: the server responded with a status of 413 (Request Entity Too Large)

To increase this limit you will need to find which config file it’s located in. Running the following will help you find which one.

grep -rn client_max_body_size /*/nginx*

Once you have found which file, you will want to open it up and raise it to a value that will allow your file to be downloaded in the future. An explanation of the value can be found in the NGINX documentation. http://nginx.org/en/docs/http/ngx_http_core_module.html#client_max_body_size

client_max_body_size 64M;

After you have edited that line you will want to restart your NGINX. But first do a quick syntax check of the configuration with the following command.

nginx -t

Now you can restart NGINX.

service nginx restart

photo credit: semi finals via photopin (license)

Share this
11 Aug
07 Aug
31 Jul
14 Jul
22 Jun

Installing Nginx with yum

install the RPM

rpm -Uvh http://download.fedora.redhat.com/pub/epel/5Server/x86_64/epel-release-5-4.noarch.rpm

rpm -Uvb http://download.fedora.redhat.com/pub/epel/5Server/i386/epel-release-5-4.noarch.rpm


yum install nginx

edit the main config

nano /etc/nginx/nginx.conf

Save the file

If you have apache running on port 80, you wil need to stop it if you want nginx to listen on port 80.

/etc/init.d/httpd stop

then start nginx /etc/init.d/nginx start


Share this
17 Jun

© 2018 Prohost.be BVBA. All rights reserved.