Latest posts

Browse topics

How to solve Nginx: 413 Request Entity Too Large error

If you have ever encountered an error message that says "Nginx: 413 Request Entity Too Large", you know how frustrating it can be. This error message usually pops up when you try to upload a file that is too large for your server to handle. The good news is that it is possible to fix this error message.

In this article, we will discuss some methods you can use to solve the "Nginx: 413 Request Entity Too Large" error.

Here are some solutions to fix the "Nginx: 413 Request Entity Too Large" error:

  1. Increase the client_max_body_size limit: The first solution is to increase the client_max_body_size limit in your Nginx configuration file. This limit determines the maximum size of the files that can be uploaded to your server. You can increase this limit by adding the following line to your Nginx configuration file:  

client_max_body_size 100M;

This will increase the client_max_body_size limit to 100MB. You can increase or decrease this limit to suit your needs.

  1. Change the upload_max_filesize limit in PHP: If you are running a PHP application, you may also need to increase the upload_max_filesize limit in your PHP configuration file. You can do this by adding the following line to your PHP configuration file:  

upload_max_filesize = 100M

This will increase the upload_max_filesize limit to 100MB. Again, you can adjust this limit as needed.

  1. Modify the request buffer size: Another solution to the "Nginx: 413 Request Entity Too Large" error is to modify the request buffer size in your Nginx configuration file. This can be done by adding the following lines to your Nginx configuration file:  

client_body_buffer_size 128k;

client_header_buffer_size 1k;

client_max_body_size 10m;

large_client_header_buffers 2 1k;

These lines will increase the client body buffer size, client header buffer size, and the maximum size of the client request body. You can adjust the values as needed.

  1. Use a Content Delivery Network (CDN): If you are still experiencing the "Nginx: 413 Request Entity Too Large" error after trying the above solutions, you may want to consider using a Content Delivery Network (CDN) to handle your file uploads. CDNs can handle large files and take the burden off your server.

  2. Contact your hosting provider: If you have tried all of the above solutions and you are still experiencing the "Nginx: 413 Request Entity Too Large" error, it may be time to contact your hosting provider. They may be able to help you troubleshoot the issue and provide a solution.

In conclusion, the "Nginx: 413 Request Entity Too Large" error can be frustrating, but it can be fixed. By following the above solutions, you can increase the file upload limits and get your server working properly.

How to Install ownCloud on Linode - Ubuntu 14.04

OwnCloud is a self-hosted, open-source file sharing and cloud storage platform that allows individuals and organizations to store, access, and share files securely from any device. With OwnCloud, users can create and collaborate on documents, calendars, and other digital assets, while keeping full control over their data and privacy.

OwnCloud offers a range of features such as file synchronization, version control, encryption, and integration with third-party apps, making it a popular choice for businesses, schools, and individuals looking for a flexible and customizable cloud storage solution.

Find my first impressions with the ownCloud server here. 

 I decided to create a simple tutorial where I have noted have one (perhaps you) can install his/her own file-sharing server - ownCloud. I'm going to use Linode VPS, Ubuntu 14.04, and Apache

Actually, I tried to set ownCloud on Ngnix, but there were some problems with it, so i stuck with Apache

  • At first, I bought a new VPS from Linode.
  • Quickly deployed a new Ubuntu 14.04 server
  • And rest was handled using SSH (Putty)
sudo sh -c "echo 'deb http://download.opensuse.org/repositories/isv:/ownCloud:/community/xUbuntu_14.04/ /' >> /etc/apt/sources.list.d/owncloud.list"
sudo apt-get update
sudo apt-get install owncloud

And voilà - a new self-hosted ownCloud installation was born. Literally in a matter of few minutes (Though I performed a test for a few hours before, by trying to put ownCloud on Ngnix)

Though I prefer Nginx over Apache, in this case, this is not about Nginx or Apache, this is about the solution I could deploy quickly.

Now, as tempting might look just a few rows of code to execute to install an ownCloud server, here are a few more things you should take into consideration:

Remove root from SSH

One of the biggest security holes you could open on your server is to allow directly logging in as root through ssh because any cracker can attempt to brute force your root password and potentially get access to your system if they can figure out your password.

Create a new admin user on your server (change admin to something better)

adduser admin
visudo

The visudo command will open up the /etc/sudoers file. All you need to do to grant sudo privileges to admin is to add a line beneath root’s, so that it looks like this:

# User privilege specification
root ALL=(ALL:ALL) ALL
admin ALL=(ALL:ALL) ALL

Now exit your SSH connection as root, and re-login as admin

Turn off root login

nano /etc/ssh/sshd_config
# Authentication:
PermitRootLogin no

Now go ahead and restart ssh.

service ssh restart

Now,you have secured your SSH a little bit.

Secure IP tables

Setting up a good firewall is an essential step to take in securing any modern operating system. Most Linux distributions ship with a few different firewall tools that we can use to configure our firewalls. 

Follow this guide on Digital Ocean: https://www.digitalocean.com/community/tutorials/how-to-set-up-a-firewall-using-iptables-on-ubuntu-14-04

Use SSL Certificates (HTTPS)

TLS, or transport layer security, and its predecessor SSL, secure sockets layer, are secure protocols created in order to place normal traffic in a protected, encrypted wrapper.

Follow this guide on Digital Ocean: https://www.digitalocean.com/community/tutorials/how-to-create-a-ssl-certificate-on-apache-for-ubuntu-14-04

One thing to mention - you should search for some reputable and trusted SSL vendor. Self created certifictes can do a damage for your company - leaving to think your customers your server or worst you are not trustable.

About ownCloud

ownCloud is an enterprise-grade file sync and share solution that is as easy to use as consumer-grade products, but is hosted in your data center, on your servers, using your storage. ownCloud integrates seamlessly into your IT infrastructure, allowing you to deliver file sharing services that conform to your data security and compliance policies. Your employees will love ownCloud’s clean, professional user interfaces; you’ll enjoy peace of mind, knowing that your data is under IT control at all times.

With over 1.3 million users, ownCloud is the preferred file-sharing solution for enterprises everywhere. 

Visit ownCloud to find out more.

New Asia - Tbilisi Restaurant Review

New Asia is a Chinese restaurant located in Tbilisi on Griboedov street (just next to Rustaveli Avenue). The idea to visit this Chinese restaurant came spontaneous... you see - khinkali, khachapuri or barbecue... there are times you get sick and tired of them in Georgia.

So one of the alternatives is to visit some other type cuisine - and this time our choice was Chinese cuisine.

New Asia Restaurant in Tbilisi

Entrance at New Asia Restaurant in Tbilisi

Entrance at New Asia Restaurant in Tbilisi

For a surprise, the restaurant was full of people even on this Wednesday's evening. 

I decided to stick with something casual and ordered corn soup with egg for a starter:

Corn Soup at New Asia Restaurant

Corn Soup at New Asia Restaurant

The soup come with some chips (I guess made from dough?)

dough chipps

And for a main course I chose shredded beef with vegetables in sweet and hot sauce:

Shredded beef with vegetables in sweet and hot sauce

Shredded beef with vegetables in sweet and hot sauce

We ordered chicken as well

Chicken in sweet sauce

Chicken in sweet sauce

I didn't made much photos of interior here, but overall it's pretty good

Interiour at New Asia

Interior at New Asia

In conclusion:

New Asia was one of the best finding this season and I will definitely come back here.

The overall cheque here was around GEL 60

My Sighnaghi Travel Guide

Georgia teaches one important lesson—everything is relative. This was especially true during the last weekend of August. Following the trend of getting out of Tbilisi, we decided to book a hotel in the remote village of Napareuli (about 20 km from Telavi). On Saturday morning, we planned to take a marshrutka to Telavi and then a taxi from there.

First things first—I found out that marshrutkas to Telavi leave from Samgori. We took a taxi to the station, but the driver insisted we needed to go to Isani instead.

At Isani, there were no marshrutkas going to Telavi. After advising the taxi driver not to be a smart-ass, we finally drove to Samgori.

Unfortunately, we missed the 11:00 marshrutka and had to wait another 45 minutes. No way were we going to do that. Instead, we quickly found another marshrutka going to Sighnaghi.

My Georgian geography is above average, but not quite good enough to realize that Sighnaghi was not where we needed to go.

Still, we headed to Sighnaghi, as the driver assured us there would definitely be another marshrutka from there to Telavi. So wrong. Never trust Georgian drivers—I confirmed that twice that day.

Sighnaghi Town Square

Sighnaghi Town Square

Sighnaghi was eerily empty. It was already 1:00 PM when we arrived, yet there were hardly any people on the streets.

Tower in Sighnaghi

Tower in Sighnaghi

View from Sighnaghi tower

View from Sighnaghi tower

While some might see Sighnaghi as a charming provincial town, to me, it felt like part of Georgia’s "façade democracy." The town underwent a complete reconstruction, giving it a picturesque, postcard-perfect look. If you only focus on the rooftops, you might think—what a wonderful city. You might even assume people live happily and prosperously there. Wrong! I do believe every Georgian is naturally happy, but when it comes to wealth, that’s a different story.

Inside the Tower

Inside the Tower

What looks lovely from a distance might not be so appealing up close. In the picture above, you see the same tower—but from the inside, it looks more like a dog shelter.

Speaking of dogs, the animals in Sighnaghi seemed very friendly. We met many of them, and they happily accompanied us throughout our trip. They weren’t afraid of people, which made me think that locals in Sighnaghi must really love animals.

After taking a few city shots, we headed straight to a restaurant for supper. We found a place called Nikala.

Nikala Restaurant Sighnaghi

Nikala Restaurant Sighnaghi

The restaurant was completely empty, and the hostess was eager to find out where we were from. When I answered "Tbilisi," she seemed unsatisfied, even though I spoke to her in a mix of 50% Georgian and 50% English. After we ordered dolma, I asked her whether it was traditional Georgian dolma or Armenian tolma. She took pity on me and said, "It’s Georgian traditional dolma." Then she asked, "Are you Armenian?" I replied, "Do I look Armenian?" She said, "I don’t know—maybe!" I smiled and said, "Then I’m Armenian."

Georgian Traditional Dolma

Georgian Traditional Dolma

We also ordered pork barbecue, some salads, coffee, and lemonade. The hostess was so eager to figure out where I was originally from that she continued speaking to me in Georgian. Fortunately, I can speak Restaurant Georgian quite well, so I understood her without trouble.

Our total bill was 27 GEL. I must admit, the food at Nikala was excellent.

We made a few weak attempts to negotiate a taxi to Napareuli, but none of the drivers would agree to take us for 40 GEL. They all asked for 70 GEL or more.

OK, screw you, Napareuli. We decided to stay in Sighnaghi. Soon, a lady approached us and, after a few polite exchanges, offered us an apartment for 10 GEL. I told her, "We are interested, but definitely not for such a low price." I mean, what can you get for 10 GEL? A place to pitch a tent?

She then offered a room for 30 GEL with Wi-Fi and TV, which sounded tempting, so we agreed to take a look. Damn. The same Soviet-style beds, and the shower was outside. No way—I avoid such places. I may not be wealthy, but I have my standards, and having a shower inside my apartment is one of them.

A few meters away, we found a hotel/restaurant and asked if they had rooms. They offered one for 30 GEL, but it had no windows and no air circulation. No, NO, No. This wasn’t a hotel—it was a homeless shelter.

Eventually, they showed us another room for 50 GEL with a shower inside. Although it still had no windows, it had garage doors. (Yeah, as I later realized, we were staying in a garage.)

Garage doors

Our "hotel’s" garage doors

Despite all that, we made the best of our time in Sighnaghi, enjoying the food, exploring the town, and ending the night with a Turkish coffee on the sidewalk next to our "hotel."

Next morning, we headed back to Tbilisi.

So, in brief, that was my one-day travel guide to Sighnaghi. I’ll say this—Sighnaghi is a lovely town, but there isn’t much to do there except eat a lot of delicious Kakhetian food.

How to add Open Graph protocol for your Drupal site

The Open Graph protocol is a set of meta tags that can be added to web pages to improve how they are displayed on social media platforms like Facebook, Twitter, and LinkedIn.

By including Open Graph tags, website owners can control how their content appears in social media feeds, including the title, description, and thumbnail image. In this article, we will discuss how to add an Open Graph protocol for your Drupal site.

Step 1: Install the Metatag module The first step in adding Open Graph protocol to your Drupal site is to install the Metatag module. This module allows you to add metadata to your site, including Open Graph tags. To install the module, go to the Drupal website and download the Metatag module. Once the module is downloaded, install it on your site by following the Drupal installation instructions.

Step 2: Configure the Metatag module After installing the Metatag module, you will need to configure it to include the Open Graph protocol. To do this, go to the configuration page for the module and click on the "Open Graph" tab. On this page, you can configure the Open Graph tags for your site, including the default title, description, and image.

Step 3: Customize Open Graph tags for individual pages While the Metatag module allows you to configure default Open Graph tags for your site, you may want to customize the tags for individual pages. To do this, go to the edit page for the content you want to customize and scroll down to the "Metatags" section. Here, you can add custom Open Graph tags for the page, including the title, description, and image.

Step 4: Test your Open Graph tags After adding Open Graph tags to your Drupal site, it's important to test them to ensure they are working correctly. You can do this by using Facebook's Open Graph Object Debugger or Twitter's Card Validator tool. These tools allow you to test how your content will appear on social media platforms and identify any issues with your Open Graph tags.

In conclusion, adding Open Graph protocol to your Drupal site can improve how your content is displayed on social media platforms and help drive more traffic to your site. By following these steps, you can easily add Open Graph tags to your site and customize them for individual pages. Remember to test your tags to ensure they are working correctly and make any necessary adjustments to improve your site's social media presence.