Tag Archives: Nginx

Why Sangkrit.net Hosting Owners Don’t Need Cache Plugins?

Website cache conducts a process of temporarily storing digital copies of web pages and their resources such as HTML files, images, CSS, JavaScript, and other elements in static form.

These cached copies are then served to users when they browse the website, as a result, the load on the server is reduced as the requests are decreased, and the processes used for generating the same content repeatedly are also lessened. Thus, caching significantly improves website performance, its loading speed, and overall user experience.

So everytime when it comes to website optimization and performance enhancement, caching is often one of the first techniques recommended. Caching stores copies of web pages or parts of pages to deliver content more quickly to users. Typically, website owners resort to various cache plugins or tools to improve loading speeds, especially for WordPress or other CMS-based websites. However, if you’re using Sangkrit.net hosting, you can skip the hassle of managing cache plugins. This is because Sangkrit.net’s hosting and servers come with cPanel integrated with Nginx cache, allowing users to activate powerful caching mechanisms with a single click.

This article explains why Sangkrit.net hosting users don’t need any external cache plugins or tools and how the built-in Nginx caching in cPanel provides a comprehensive and efficient solution for optimizing website speed and performance.

The Advantages of Built-In Nginx Cache

Effortless Activation from cPanel

Sangkrit.net hosting plans include cPanel, which is the most popular control panel for web hosting. What sets Sangkrit.net apart is the integration of Nginx as a reverse proxy cache. This means that Nginx sits between the user’s browser and the web server, caching the content and serving it to users directly without having to process requests repeatedly on the server.

The caching can be activated with just one click from the cPanel dashboard. Users do not need to install additional plugins or configure complex settings to benefit from caching. Once the Nginx cache is enabled, the server automatically handles the caching process for both static and dynamic content. This makes it especially beneficial for beginners or those who want a hassle-free way to optimize their websites.

Superior Speed with Nginx Caching

Nginx is widely known for its high performance, especially when it comes to handling multiple requests simultaneously. Unlike traditional caching mechanisms, Nginx operates as a reverse proxy, which allows it to cache static assets such as images, JavaScript, and CSS files, as well as dynamic content. By caching at the server level, Sangkrit.net’s Nginx integration reduces the load on the web server, leading to faster loading times.

Since the cache is handled by the server itself, it is much more efficient than using third-party cache plugins. With a cache plugin, the server still has to load WordPress or another CMS to serve cached content, whereas Nginx can directly serve cached content without invoking the web application, leading to substantial performance improvements.

Reduced Server Load

The primary purpose of caching is to reduce the load on the server. When cache plugins are used, they still operate within the environment of the content management system (e.g., WordPress), which requires server resources to process even cached requests. On the other hand, Nginx handles caching outside the CMS, serving cached responses directly from the memory or disk.

This server-level caching approach not only frees up resources for other processes but also significantly reduces server response time. For Sangkrit.net users, this means that websites can handle more traffic with the same amount of server resources. The server-level caching also helps to prevent overload during traffic spikes, ensuring consistent website performance.

Why Cache Plugins Become Unnecessary?

Compatibility Issues with Plugins

Cache plugins often have compatibility issues, especially with complex themes, eCommerce functionalities, and other plugins. These compatibility issues can cause unexpected errors, such as broken layouts or malfunctioning features. With Sangkrit.net’s Nginx caching, the cache works independently of the CMS and is applied at the server level, eliminating the potential for such conflicts.

Furthermore, there is no need to troubleshoot the cache plugin settings or adjust the configuration based on different requirements, as the Nginx cache system has already been optimized to deliver maximum performance.

Simplified Cache Management

Managing cache plugins often requires regular maintenance, including purging the cache when updates are made to the site. Failing to do so can cause visitors to see outdated content. With Sangkrit.net’s built-in Nginx caching, cache purging can be done effortlessly through cPanel, which simplifies the management process. The system can also be configured to automatically refresh the cache at specified intervals.

Users no longer need to worry about adjusting cache settings or dealing with complex cache invalidation rules. This makes it a better solution for those who prefer a simplified caching solution without compromising on performance.

Increased Security & Reduced Risk

Cache plugins, like any other plugin, can introduce security risks if not properly maintained. They may contain vulnerabilities that could be exploited by hackers. Additionally, using multiple plugins for caching and optimization may increase the risk of plugin conflicts, which can lead to website downtime.

Sangkrit.net users can avoid these risks entirely by using the server-level Nginx caching. Since the caching is handled at the server level, there is no need to rely on potentially vulnerable third-party plugins for performance enhancements. The server configuration itself ensures the caching system remains secure and functional.

How To Enable The Nginx Caching?

Enabling Nginx caching is straightforward and can be done in just a few steps:

  1. Log in to cPanel: Once you log in, locate the Nginx caching option within the cPanel dashboard.
  2. Turn on Nginx Caching: Enable caching with a single click, its there on the right side. The system is designed to be user-friendly, so no technical knowledge is required.
  3. Configure Cache Settings (Optional): While the default configuration works well for most users, advanced settings can be adjusted to control the caching behavior for specific pages or file types.
  4. Purge Cache When Necessary: Users can easily clear the cache from the cPanel dashboard when changes are made to the website that need to reflect immediately.

The Sangkrit.net’s hosting infrastructure is optimized for speed and reliability, with Nginx as a key component for delivering high performance. The combination of Nginx caching and SSD storage ensures that websites load quickly and handle traffic spikes with ease.

Sangkrit.net offers 24/7 customer support to assist users with any issues they may encounter. This means that even if you have questions about enabling Nginx caching or configuring your hosting, help is always available.

The Instant Dynamic Caching System Of Sangkrit.net Hosting & Servers

Now every server owner at Sangkrit.net can easily accelerate his websites by caching both static and dynamic content and reducing the load on his servers.

How Dynamic Caching Works?

Dynamic caching works by temporarily storing the dynamically generated content in a cache. When a user requests a particular piece of content, the web server first checks if a cached version of that content is available. If it is, the server serves the cached content, which is faster than generating it from scratch. If not, the server dynamically generates the content, serves it to the user, and caches it for future requests.

How To Enable Dynamic Caching On Your Server?

After you buy any Linux-based VPS or Dedicated Server, you can enable caching for yourself and also your clients by providing a caching button on every hosting account you make on your server. You and your users may use this button to turn on catching, simply follow these steps:

  1. Login to your Sangkrit.net account
  2. Visit your ‘My Products’ page
  3. Click the ‘Servers’ option
  4. Next to ‘Server Actions’ click ‘Launch WHM’
  5. Open ‘Nginx Manager’ from the software section menu on the left
  6. Enable the caching

The page allows you to enable the caching on any or all hosting accounts running on your server You can also enable cache by default for all hosting accounts or click the ‘User Settings’ tab to enable NGINX caching selectively on accounts. It also provides you the option to selectively or collectively delete your server’s cache.

Nginx Cache i.e. “HTTP Caching” Or “Proxy Caching

Nginx cache, often referred to as “HTTP caching” or “proxy caching,” is a powerful feature that allows you to temporarily store and serve web content more efficiently. It is designed to reduce the load on web servers, decrease page load times, and improve the overall performance and user experience.

Every cPanel user account created by you on your VPS or Dedicated Server also gives an option to enable caching over the websites running on the same server but have different hosting accounts.

You can turn on, turn off, or delete the cache on any website simply from the server’s main page on your Sangkrit.net account.

Configuring One Server To Handle HTTP & HTTPS Respectively

On an Nginx server, it is possible for you to configure it to manage both HTTP and HTTPS requests.

You should also know that prior to 0.7.14, it was not possible to enable SSL certificate selectively over individual listening sockets, as we have done here in the following given code:

server {
    listen              80;
    listen              443 ssl;
    server_name         www.yoursite.com;
    ssl_certificate     www.yoursite.com.crt;
    ssl_certificate_key www.yoursite.com.key;
    ...
}

Before SSL could only be enabled over the entire server using an SSL directive, thus it was impossible to put up a single HTTP/HTTPS server. Afterward, the SSL parameter of the listen directive was added to resolve this problem.

The use of the SSL directive in newer versions has been discouraged.

When Multiple HTTPS Servers Listen On A Single IP Address

In SSL protocol conduct, a typical problem occurs when two or more configured HTTPS servers listen on a single IP address.

server {
    listen          443 ssl;
    server_name     www.yoursite.com;
    ssl_certificate www.yoursite.com.crt;
    ...
}

server {
    listen          443 ssl;
    server_name     www.yoursite.org;
    ssl_certificate www.yoursite.org.crt;
    ...
}

As shown above, what exactly happens here is that the client browser starts to receive the default server’s certificate (www.yoursite.com) regardless of the name of the server requested.

This is pushed by SSL protocol conduct. Here, the connection via SSL is made before the browser sends another HTTP request and Nginx does not know the server name requested. Hence, it may only offer the default server’s certificate.

Here’s the solution:

server {
    listen          192.168.1.1:443 ssl;
    server_name     www.yoursite.com;
    ssl_certificate www.yoursite.com.crt;
    ...
}

server {
    listen          192.168.1.2:443 ssl;
    server_name     www.yoursite.org;
    ssl_certificate www.yoursite.org.crt;
    ...
}

Above given is the ancientest and most powerful way used for resolving this issue. Here a separate IP address is assigned for each HTTPS server.

Updating Nginx Server Configuration To Use The SSL You Have Purchased

You need to update the config file on your server to use the SSL certificate you are subscribed to. This can be done by accessing the command line SSH and opening the Nginx config file for the domain you are installing the SSL certificate.

Simply run the following command:

sudo vim /etc/nginx/sites-available/yourwebsite.com

Now update the config file to use the SSL certificate:

server {
        listen 80;
        server_name yourwebsite.com;
        return 301 https://$host$request_uri;
}

server {
    listen 443 ssl;

    server_name yourwebsite.com;
    ssl_certificate     /etc/nginx/ssl/yourwebsite.crt;
    ssl_certificate_key /etc/nginx/ssl/yourwebsite.key;

    root /usr/share/nginx/yourwebsite.com/;
    index index.php  index.html index.htm;

}

The next step is to save the file using this command:

wq!

And then restart your Nginx server with this command:

sudo service nginx restart

That’s it.

Configuring SSL & Intermediate Certificates On Nginx Server

In the previous lesson, you learned about installing and configuring Nginx on your dedicated server. Now this lesson is on installing SSL and other standard certificates.

The first thing you need to do is get an SSL certificate from Sangkrit.net, once you subscribe to it and your certificate request is approved just download it to install those files on your dedicated server.

To download and install your certificate files follow these steps:

  1. Visit your Sangkrit.net product page
  2. Select SSL Certificates
  3. Select Manage next to the certificate you need to download
  4. Select a Server type
  5. Click the Download Zip File option
  6. Your certificate would start downloading now.
  7. Copy the SSL certificate file and the certificate bundle file to the Nginx server
  8. You already have a key file on the server which you got when you generated your certificate request.
  9. Now edit your Nginx configuration to reference these files

Your certificate is installed now. Remember, the actual configuration file you edit depends on your version of Nginx, your OS platform, or the method you are using to install Nginx.

Installing & Configuring Nginx On Your Dedicated Server

Nginx is a web server that is also used as a reverse proxy option. It also balances the load on your dedicated server and acts as a mail proxy as well as an HTTP cache. It is software used for high performance on your server.

This lesson will guide you in installing and configuring Nginx and for that, you are going to need the root privileges. You will also require to set up your CentOS server to use the EPEL Repository which stands for Extra Packages for Enterprise Linux.

To install EPEL simply run this command:

sudo yum install epel-release

You can read more about its configuration steps here. Earlier we installed yum as a package manager but it does not include any new version of Nginx in its default repository so installing EPEL will make sure that Nginx on CentOS remains up to date.

You are ready to install Nginx

Now you are ready to install Nginx on your server, simply run the following command:

sudo yum install nginx

Next, start Nginx:

Nginx doesn’t start on its own, so you will need to run a command for starting Nginx on your server:

sudo /etc/init.d/nginx start

To make sure Nginx is properly installed on your server, just direct your browser to your server’s IP address. If you see the words, “Welcome to Nginx”, it means you have Nginx installed and working.