Jitsi is a set of open-source projects that allow you to create a secure video conferencing system for your team. It has features such as superior sound quality, excellent encryption and privacy, multi-platform and much more. The Jitsi client can work both in the application and in the web browser. You can broadcast your desktop as well as individual windows, and invite users using URL-link. We will be installing Jitsi on Ubuntu 18.04 server. We will install additional components such as Java’s OpenJdk, Nginx to correctly install, configure and use it. Let’s talk a bit about the components.
ApacheTop is an uncomplicated command line (CLI) utility that is used to monitor http traffic in real-time. It achieves this task by analyzing the incoming apache logs and based on that data presents understandable output to our screen. It can be configured to output X number of hits, or output X number of hits within X seconds.
Introduction to ApacheTop
Website owners and administrators oftentimes find themselves interested in the traffic for a specific website or multiple websites on the server. They might need this information in order to troubleshoot a high load issue on the server, or simply to learn the traffic pattern of a website, which is crucial for running a business. This information is logged in the web server’s access logs, and we can look through them to learn about the website’s traffic that has occurred in the past. Parsing through these logs to make most sense of them requires some basic skills in Bash, though, so it is not always very convenient.
However, we might want to learn more about the traffic in real-time in cases of currently high load on the server or issues with a website. In this case, we can use a monitoring tool called ApacheTop, which shows traffic in real-time. Furthermore, it collects the information from the web server’s access log and parses through it so that it generates human-readable output. This way, we can see what pages are being seen on the server in real-time, but we also do not need any Bash skills to parse through the output. It displays the information such as requests per second, bytes per second and URLs that are being requested, and its display is modelled after the standard top utility.
ApacheTop keeps a table of information by containing all the relevant data about the requests it has collected, but it can only be of a certain finite size. By default, it will show the data within the 30-second time frame, but we can define its size in a couple of ways. This can be done by making it remember a certain number of hits, or a certain number of seconds, after which it resets. We should also note that ApacheTop tool uses Apache’s default access log file for the traffic information, however, in case of a custom log path, we can also specify which log file to look through.
We can install ApacheTop like any other package, but we need to have the EPEL repository installed first.
CentOS Based Systems
yum install epel-release
yum install apachetop
Debian Based Systems
On Debian/Ubuntu based systems, we can use apt-get to install apachetop
apt-get install apachetop
In order to use ApacheTop, we can simply run the command apachetop from the command line. This will, without specifying anything else, by default use the Apache access log and display information within a 30-second timeframe.
If we want to use a custom log path, we can specify it with the -f flag:
apachetop -f /path/to/the/log/file
In order to change the default 30 second time range for showing data, we can do so with one of the following flags:
H – This flag specifies the number of hits we want ApacheTop to display. The following example will show the last 100 hits apachetop -H 100
T – This flag specifies the number of seconds for how long ApacheTop will keep track of the data. In the following example, ApacheTop will be showing hits in the last 60 seconds: apachetop -T 60
Some of the additional flags that we can also use include the following.
– q – This flag instructs ApacheTop to keep the query strings, instead of removing them
– l – This flag instructs ApacheTop to use all lowercase URLs, which causes it to accumulate the same statistics for both uppercase and lowercase URL
– s segments: This flag instructs ApacheTop to keep only the first parts of the path, which causes the statistics to be merged for each truncated URL
– p – protocol: This flag is kept at the front of its referrer strings. By default, it is removed to give more room to more useful information
– r secs: This flag sets the default refresh delay in seconds
Reading the Output
When we run the apachetop command, at the top of the screen we can see a summary of the statistics, as is shown in the image below.
The first line shows the time of the last hit, ApacheTop running time and the current time of the server.
The second and third lines show the statistics of all the visits since ApacheTop started running. On the second line we can see the total number of requests, along with the number of requests per second; total size of all requests with the number of bytes per second; and the average size of each request. The third line shows the number of requests that are returning 2xx, 3xx, 4xx and 5xx web server response codes.
The fourth and fifth lines show the same statistics as the second and the third respectively, but they only display the information within the specified, or default, time range.
Below these top five lines, we have the list of URLs that are being requested, with the total number of hits for each, and the size of the request in question, as can be seen in the image below.
The star (*) symbol next to the URL specifies which request is selected. We can select different requests by moving with the Up and Down arrow keys. Once we reach the request we are interested in, we can press the Right arrow key, which will take us to the page with details for that request. The details include the hosts requesting that URL and the referrers. To return to the main list, we can use the Left arrow key.
We can also switch the main view from showing the URLs, to show Hosts, or Referrers instead, by pressing the d key. In the image below, we are currently seeing the hosts instead of the URLs:
We can also choose what to see in the view by using filters. We can access those by pressing the fkey, and we will be presented with three options:
Pressing each of the letters will activate the corresponding action. If we want to add a filter, we would press the a key, and then we can choose if we want to filter by
Pressing the corresponding key would let us enter which URL, or referrer or host we want to filter by. Once we enter the information, the view will only show the requests that fit the entered criteria.
The ApacheTop utility is an extremely useful monitoring tool that is easy to use while providing human-readable information that can help pinpoint the cause of certain server and website issues. However, one should keep in mind not to monitor the traffic with an extended time frame or too many hits, as that would use too many CPU and memory resources, which could only add to the problem at hand.
Today we will demonstrate how to install Envoy Proxy on Ubuntu.
Envoy is a high performance C++ distributed proxy designed for single services and applications, as well as a communication bus and “universal data plane” designed for large microservice “service mesh” architectures. Built on the learnings of solutions such as NGINX, HAProxy, hardware load balancers, and cloud load balancers, Envoy runs alongside every application and abstracts the network by providing common features in a platform-agnostic manner.
WordPress has a great GUI-based installation process however some use cases call for CLI! Or, maybe you just feel more at home in a terminal, either way this article will show you how to get your WordPress site setup with just a terminal, using WP-CLI, and maybe a sprinkle of SSH.
In order to be able to install WordPress manually using WP-CLI you will first need to create a new database for the WordPress install. You will need to know how to find your SSH credentials as well as being used to using Terminal or Putty and WP-CLI.
Have you ever wondered how Python web applications work on an Apache or NGINX web server? The answer is WSGI or Web Server Gateway Interface.
Python is rapidly gaining in popularity for various web applications and software options. WSGI is one of the numerous powerful frameworks that are enabling this forward-looking acceptance. You may be new to Python web applications and wondering how this type of application is deployed in a production environment or you may have already used this type of framework previously, but want to know more about what WSGI is.
Reading Time: 6minutesNGINX is a webserver that is becoming an increasingly popular option for webhosting, as sixteen percent of all sites on the internet are utilizing NGINX. This percentage is constantly increasing as clients are in need of a web server that can serve content faster. It can also be used for proxies, reverse proxies, load balancing, and more depending on what modules you load onto NGINX. One of the significant differences between Apache (a popular webserver) and NGINX is the way each system handles access rules. If you are familiar with using .htaccess rules in Apache, then the method that NGINX uses of including directives in the server’s vhost block will be substantial change.
Reading Time: 6minutesWith the shortage of available address space in IPv4, IPs are becoming increasingly difficult to come by, and in some cases, increasingly expensive. However, in most instances, this is not a drawback. Servers are perfectly capable of hosting multiple websites on one IP address, as they have for years.
Reading Time: 5minutesWhen choosing a server operating system, there are a number of factors and choices that must be decided. An often talked about and referenced OS, Ubuntu, is a popular choice and offers great functionality with a vibrant and helpful community. However; if you’re unfamiliar with Ubuntu and have not worked with either the server or desktop versions, you may encounter differences in common tasks and functionality from previous operating systems you’ve worked with. I’ve been a system administrator and running my own servers for a number of years, almost all of which were Ubuntu, here are the top four lessons I’ve learned while running Ubuntu on my server.
A redirect is a web server function that will redirect traffic from one URL to another. Redirects are an important feature when the need arises. There are several different types of redirects, but the more common forms are temporary and permanent. In this article, we will provide some examples of redirecting through the vhost file, forcing a secure HTTPS connection, redirection to www and non-www as well as the difference between temporary and permanent redirects.
Temporary redirects (response code: 302 Found) are helpful if a URL is temporarily being served from a different location. For example, these are helpful when performing maintenance and can redirect users to a maintenance page.
However, permanent redirects (response code: 301 Moved Permanently) inform the browser there was an old URL that it should forget and not attempt to access anymore. These are helpful when content has moved from one place to another.
How to Redirect
When it comes to Nginx, that is handled within a .conf file, typically found in the document root directory of your site(s), /etc/nginx/sites-available/directory_name.conf. The document root directory is where your site’s files live and it can sometimes be in the /html if you have one site on the server. Or if your server has multiple sites it can be at /domain.com. Either way that will be your .conf file name. In the /etc/nginx/sites-available/ directory you’ll find the default file that you can copy or use to append your redirects. Or you can create a new file name html.conf or domain.com.conf.
If you choose to create a new file be sure to update your symbolic links in the /etc/nginx/sites-enabled. With the command:
The first example we’ll cover is redirection of a specific page/directory to the new page/directory.
Temporary Page to Page Redirect
# Temporary redirect to an individual page
rewrite ^/oldpage$ http://www.domain.com/newpage redirect;
Permanent Page to Page Redirect
# Permanent redirect to an individual page
rewrite ^/oldpage$ http://www.domain.com/newpage permanent;
Permanent www to non-www Redirect
# Permanent redirect to non-www
rewrite ^/(.*)$ http://domain.com/$1 permanent;
Permanent Redirect to www
# Permanent redirect to www
rewrite ^/(.*)$ http://www.newdomain.com/$1 permanent;
Sometimes the need will arise to change the domain name for a website. In this case, a redirect from the old sites URL to the new sites URL will be very helpful in letting users know the domain was moved to a new URL.
The next example we’ll cover is redirecting an old URL to a new URL.
Permanent Redirect to New URL
# Permanent redirect to new URL
rewrite ^/(.*)$ http://newdomain.com/$1 permanent;
We’ve added the redirect using the rewrite directive we discussed earlier. The ^/(.*)$ regular expression will use everything after the / in the URL. For example, http://olddomain.com/index.html will redirect to http://newdomain.com/index.html. To achieve the permanent redirect, we add permanent after the rewrite directive as you can see in the example code.
When it comes to HTTPS and being fully secure it is ideal for forcing everyone to use https:// instead of http://.
Redirect to HTTPS
# Redirect to HTTPS
server_name domain.com www.domain.com;
return 301 https://example.com$request_uri;
After these rewrite rules are in place, testing the configuration prior to running a restart is recommended. Nginx syntax can be checked with the -t flag to ensure there is not a typo present in the file.
Nginx Syntax Check
If nothing is returned the syntax is correct and Nginx has to be reloaded for the redirects to take effect.
service nginx reload
For CentOS 7 which unlike CentOS 6, uses systemd:
systemctl restart nginx
Redirects on Managed WordPress/WooCommerce
If you are on our Managed WordPress/WooCommerce products, redirects can happen through the /home/s#/nginx/redirects.conf file. Each site will have their own s# which is the FTP/SSH user per site. The plugin called ‘Redirection’ can be downloaded to help with a simple page to page redirect, otherwise the redirects.conf file can be utilized in adding more specific redirects as well using the examples explained above.
Due to the nature of a managed platform after you have the rules in place within the redirects.conf file, please reach out to support and ask for Nginx to be reloaded. If you are uncomfortable with performing the outlined steps above, contact our support team via chat, ticket or a phone call. With Managed WordPress/WooCommerce you get 24/7 support available and ready to help you!