How to set up a Raspberry Pi web server in 2021 [Guide]

Raspberry Pi is not just a small on-board computer, but a DIY board that can do almost anything and everything. Do you want to configure Pi-hole on Raspberry Pi to block ads and trackers from your entire home network? Yes, it does that. Do you want to set up a Raspberry Pi web server for web development and local file transfer? Well, he does too. In fact, using a Raspberry Pi is a great and affordable way to build a personal web server. So if you are interested, follow this simple guide and turn your Raspberry Pi into a web server in no time.

Configure a Raspberry Pi web server (2021)

To set up a Raspberry Pi web server, you must first install a web server. There are two popular web servers: Apache and Nginx. But in this tutorial, we will be using Apache because it is reliable and easier to use. Apart from that, we will also install PHP so that you can host dynamic web pages on your Raspberry Pi. Now that all of that has been said, let’s move on to the steps.

  • Install Apache web server on Raspberry Pi

1. First of all, make sure you have flashed Raspberry Pi OS with Desktop Computer User interface on SD card. If you’re new to all of this, follow our guide on how to set up Raspberry Pi remotely. That said, if you have an external monitor, things will be a lot smoother.

2. Once the Raspbian operating system has started, open the terminal and run the command below to update Raspbian operating system to the latest version.

sudo apt-get update && sudo apt-get upgrade -y

3. Then we have to install the Apache web server on Raspberry Pi. Run the command below in the terminal.

sudo apt install apache2 -y

Configure a Raspberry Pi web server (2021)

4. Once installed, the Apache web server will be operational. Simply open the browser on Raspberry Pi and enter localhost or 127.0.0.1, and press Enter to access the web server. It should load the Apache HTML page.

Configure a Raspberry Pi web server (2021)

5. You can also directly enter the IP address of the Raspberry Pi in a browser to access the web server. Course hostname -I in the Terminal, and you will find the IP address of your RPi.

Configure a Raspberry Pi web server (2021)

6. Enter the IP address into the browser, and that’s it. In fact, you can use the IP address on any device on your local Wi-Fi network and you will be able to access the web server. For example, I can easily access the Raspberry Pi web server from my Chromebook.

Configure a Raspberry Pi web server (2021)

7. For your information, all web server files are saved in /var/www/html/ place. So you can change the directory to this location and view all files. Here are the commands to execute.

cd /var/www/html/
ls -al

Configure a Raspberry Pi web server (2021)

8. As you can see in the screenshot above, the index.html the file belongs to root. So before you change anything, you need to change the owner to pi (you). Run the command below to change owner.

sudo chown pi: index.html
ls -al

As you can see in the screenshot below, pi is now the owner of the web server. You can also use the same format to change the ownership of folders such as html and www.

change owner

9. Now go ahead and open the file through terminal or file manager. I am using the file manager for easier access. Move towards “var -> www -> HTML”, right click on the “index.html” file, and choose “Text Editor”.

raspberry

10. Now if I make any changes to the title and save it, they will be reflected on the web server immediately. You will see the updated title when you open the web server in a browser the window. This step confirms that your Raspberry Pi web server is working fine.

Configure a Raspberry Pi web server (2021)

  • Install PHP on Raspberry Pi

If you want to test your web pages on Raspberry Pi, installing only the web server will not shut it down. You must also install PHP to have a solution like XAMPP on Raspberry Pi. It will allow you to test dynamic web pages on your Raspberry Pi. Here is how to go about it.

1. Run the command below to install the latest version of PHP on your Raspberry Pi.

sudo apt install php libapache2-mod-php -y

Install PHP on raspberry pi

2. Then go to the same var/www/html/ directory and create a php file using a text editor.

Install PHP on raspberry pi

3. Then open the file with a text editor and enter PHP code you want to add. For example, I added the PHP code which generates a simple instruction.

Install PHP on raspberry pi

  • Test FileZilla on Raspberry Pi

Once we have configured the Apache and PHP web server on Raspberry Pi, it is finally time to test if we can transfer our existing web assets to the RPi web server with the popular FileZilla FTP client. You can also use other FTP clients like WinSCP if you want. Here are the steps to follow.

1. Install FileZilla (Free) on another PC connected to the same Wi-Fi network.

2. Next, on Raspberry Pi, go to the “Start Menu -> Preferences -> Raspberry Pi Configuration” section. Here go to “Interfaces” and activate “SSH”.

Test FileZilla on raspberry pi

3. On FileZilla, open “File Menu -> Site Manager” and add a “New Site”. Right here, choose “SFTP” as the protocol and enter the IP address of the Raspberry Pi web server in the “Host” field. Leave the “Port” field empty. After that enter the default credentials: pi as username and raspberry as password. Now click on “Connect”.

To note: If you changed the Raspberry Pi password during setup, enter the new password.

Test FileZilla on raspberry pi

4. You will connect to the web server of your Raspberry Pi. Now you can transfer all your HTML, CSS and PHP assets straight to Raspberry Pi and launch your web development hassle-free.

Test FileZilla on raspberry pi

Turn your Raspberry Pi into a web server in a few easy steps

This is how you can set up a web server on Raspberry Pi. All the tools required to run a web server are available on the Debian based Raspbian operating system, so there is no problem. Even if you are a beginner, you can follow the step by step instructions above and turn the RPi card into a web server in no time. Anyway, it all comes from us. If you have any questions, let us know in the comments section below.


Source link

What is a web server and how does it work?

When you log in, whether it’s to check out social media or even read this article, you are using one or more web servers. These are an essential part of the modern Internet and function as the connecting link between you and the website you are visiting.

But what is a web server and how does it work?

What is a web server for?

A web server is the computer that receives and responds to user requests to access a website. It consists of both hardware, in the form of the device carrying the data, and software as the device’s operating system and web server software.

Web servers are near phones, not wires or the communications system. Web servers use various communication protocols to respond to client requests. The most commonly used is HTTP, which stands for Hypertext Transfer Protocol, a secure variant is HTTPS.

Other protocols include Simple Mail Transfer Protocol (SMTP) and File Transfer Protocol (FTP).

Web servers are computers. But instead of letting you use them for various tasks, they often have just one purpose. And like all computers, they need hardware to run.

The hardware part of a web server can be as large as the supercomputers used by Internet companies, like Google and Facebook, or as small and simple as a laptop. The operating system, which can be anything from Windows and macOS to Linux, is what allows you to communicate with the server.

The simplest web server contains an HTTP server, a database, and at least one scripting language. They all work in tandem, allowing the server to request web pages and communicate with other online servers as needed.

How does a web server work?

Man using laptop connected to a big server

Users can access web servers through the URL or domain names of websites that the server can communicate with. The software components do all the necessary processing and translation. It uses one of its scripting languages, such as PHP, Python, Ruby, or Java, to request a web page.

The server then downloads all requested files and media into its internal database before sending the content to your browser. This includes rich media files, images and JavaScript files, as well as HTML web pages.

All you need to do is enter the correct “location” of the server or URL. Using the URL, your browser retrieves the IP address of the domain using the Domain Name System (DNS). When the web server receives and approves the request, it sends the web page you are looking for.

But sometimes things go wrong. If you try to access a page that you are not authorized to access, the server will refrain from delivering the page. Instead, it responds with an error message telling you what went wrong, usually via an error code.

Remote or local web servers

Representation of web servers in the cloud

Since web servers are primarily hardware, they must exist in a physical location, even remotely. The vast majority of web servers are hosted remotely. As the name suggests, a remote server is a server that is not in the same location as the user.

When you plan to host your own website, you have the option of using remote servers or hosting your own locally. A remote web server, depending on the company you rent it from, may contain just your website or multiple websites with different URLs.

Read more: What is a URL?

But using a local web server often means turning your own laptop, computer, or tablet into a web server. Then it can receive requests from other people’s browsers and grant them access to your website. However, you can also buy a dedicated server, keep it and maintain it locally.

Choose the right type of server

In the tech world, you can find multiple tools performing similar tasks without being interchangeable. Before committing to any type of server, make sure that it suits your needs.

For example, a file server does not give you access to a website, but purports to be a storage unit for files and documents. You can use a file server to store files alongside a web server, but you can’t use it to host an entire website for open or limited access.


macos-windows-10-hackintosh
How to run macOS on Windows 10 in a virtual machine

Confused about how well you get along with a Mac? Learn how to run macOS on Windows 10 using a virtual machine.

Read more


About the Author


Source link

How to create a basic web server with Node.js

Node.js has been one of the most popular choices for server-side development since it was first released over a decade ago. It’s still relatively new compared to PHP and other back-end technologies, but it’s widely adopted by big tech companies like LinkedIn, PayPal, and Netflix.

This article describes how to create and run your own web server using the Node.js and Express.js web frameworks.

Associated technologies and packages

Node.js is a JavaScript runtime engine built on top of Chrome’s V8 engine that allows you to run JavaScript code outside of your browser. Traditionally, JavaScript Document Object Model (DOM) programming languages ​​add interactivity to your website.

Because of this, the DOM only exists in web pages, so JavaScript code has been limited to executing only in the browser. Node.js allows you to run JavaScript on the command line and on the server. Therefore, install Node.js and npm on your machine before you start.

Express.js, on the other hand, is the minimal web framework that has become the de facto backend framework for Node.js. However, Express.js is not required. The integrated module can still be used http A Node.js module to create servers. Express.js http It is a module that provides a simpler API with all the configurations you need.

Build a web server

To better organize your code, you can start by creating a folder with all your files and dependencies. Express.js is not a built-in Node.js module and must be installed using npm.

Read more: What is npm?

Run the command to install the Express.js package npm install express In a terminal or a command prompt. Make sure you are in the project directory before installation.

Install Express via npm

When you’re done, you can use your text editor or IDE of your choice to open the folder and create a new file named. server.js.. To use the Express.js package, import this instance first, then server.js Such files:

const express = require('express');
const app = express();

The main purpose of the web server is to respond to requests from different roots using the appropriate management functions. This code handles all GET requests made at the root (“Https://www.makeuseof.com/”) Go through and respond with “Hello World!”.

app.get("https://www.makeuseof.com/", (req, res) => {
res.send('

Hello World

');
});

Likewise, you can display dynamic content and perform other operations, depending on the path and type of request. This can be done using root parameters indicated by semicolons. : Before the parameter.

app.get('/:name', (req, res) => {
res.send(`

Welcome to ${req.params.name}!

`);
};

In the two examples above, the first line shows the use of .. to have() Express.js methods that take two parameters: an endpoint or root, and a callback handler function that takes request and response objects as parameters. These two parameters are sent automatically when you make a request.

On the second line, the answer is .send () The method of the response object. You can enter any text or HTML in parentheses. Access for dynamic routes req.params.name (Because you used it /: first names(From query object) returns the value of dynamic route parameter (from query object)first names in that case. )

Finally, to start listening for incoming requests on the port, .. Listen() A method that receives a port number to execute when executed successfully and an optional callback function.

app.listen(5000, console.log('Server is running on port 5000'));

This example used port 5000, but you can change it to any valid port. That’s all the code you need to build a basic web server using Node.js and Express.js. The same concept can be extended further to make other requirements such as: Position, To put, Or Wipe off To another route, here’s how server.js The file looks like this:

Server test

To run the code and start the server Node server Terminal commands or project directory command prompt. This will perform the callback function provided in. .. Listen() Method.

Express server running

To verify that the server is running, open a web browser and http: // localhost: 5000

Express.js-root root demo

Likewise, when accessing the next dynamic route http: // localhost: 5000 / muoThe second handler function is executed and you should see something like this:

Express.js-Dynamic route demo

Press to stop the server Ctrl + C Windows or Cmd + C On macOS.

Node.js can do even more

The popularity of JavaScript is growing exponentially as developers use it not only on the back end but also on the front end. This eliminates the need to learn multiple programming languages ​​and allows you to start your journey as a full-stack web developer using only JavaScript.

If you want to try out Google’s programming language, building a basic web server is a great starter project.

Featured Image of GoWeb Server
How to create a basic web server with Go

Ready, Golang: start building your web server with Go.

Read more

About the Author

..


Source link

How to create a basic web server in Node.js

Node.js has become one of the most popular choices for server-side development since its initial release over a decade ago. Although it is still relatively new compared to PHP and other backend technologies, it has been widely adopted by tech giants like LinkedIn, PayPal, Netflix, etc.

This article will teach you how to build and run your own web server with Node.js and the Express.js web framework.

Technologies and packages involved

Node.js is a JavaScript runtime built on Chrome’s V8 engine that allows you to run JavaScript code outside of the browser. Traditionally, the JavaScript programming language has been used to manipulate the Document Object Model (DOM), adding interactivity to websites.

For this reason, the JavaScript code has been restricted to run only in the browser, as the DOM only exists on web pages. With Node.js, you can run JavaScript at the command line and on servers. Therefore, it is essential to install Node.js and npm on your machine before starting.

On the other hand, Express.js is a minimalist web framework that has become the de facto backend framework for Node.js. However, Express.js is not a necessity. You can still use the http Node.js module to build your server. Express.js is built on top of the http module and provides a simpler API with all the necessary configurations.

Build a web server

To better organize your code, you can start by creating a folder where all the files and dependencies will reside. Since Express.js is not a built-in Node.js module, you will need to install it using npm.

Read more: What is npm?

To install the Express.js package, run the command npm install express on your terminal or command prompt. Make sure you are in the project directory before installation.

Install express via npm

When done, you can open the folder using any text editor or IDE of your choice and create a new file named server.js. To use the Express.js package, you must first import and create an instance of it in the server.js file like this:

const express = require('express');
const app = express();

The main purpose of a web server is to respond to requests from different routes with the appropriate handler function. This code handles all GET requests made at the root (“/”) and responds with “Hello World!”

app.get('/', (req, res) => {
res.send('

Hello World

');
});

Likewise, you can display dynamic content and perform other operations depending on the path and type of request you make. This can be done using the route parameters, indicated by the semicolon : in front of the parameter.

app.get('/:name', (req, res) => {
res.send(`

Welcome to ${req.params.name}!

`);
};

In the two examples above, the first line represents the use of the .to have() Express.js method which takes 2 parameters: the endpoint or the route, and a callback handler function which takes requests and response objects as parameters. These 2 parameters are sent automatically when you make a request.

In the second line, the answer is made through the .send() method on the response object. Inside the parenthesis, you can enter any text or HTML code you want. In the case of dynamic routes, access req.params.name (since you used /:Name) of the request object will return the value of the dynamic route parameter (name in that case.)

Finally, to start listening for incoming requests on a port, you can use the .Listen() method that takes the port number and an optional callback function to execute on successful execution.

app.listen(5000, console.log('Server is running on port 5000'));

I used port 5000 in the example, but you can change it to any valid port. That’s all the code you need to build a basic web server with Node.js and Express.js. The same concept can be extended further to make other demands such as PUBLISH, TO PUT, Where WIPE OFF to other routes. Here is how the server.js the file will look like:

ExpressJS code for web server

Server test

To run the code and start the server, run the node server on your terminal or at the command prompt in the project directory. This will perform the callback function you provided on the .Listen() method.

Express server running

To confirm that the server is running, open a web browser and visit http: // localhost: 5000

Express.js - root route demo

Likewise, if you are visiting a dynamic route such as http: // localhost: 5000 / muo, the second handler function will run and display:

Express.js - Dynamic route demo

To stop the server, press Ctrl + C under Windows or Cmd + C on macOS.

Node.js can do more

The popularity of JavaScript is increasing sharply as developers use it on both the front-end and the back-end. This eliminates the need to learn multiple programming languages ​​and helps you start your journey as a full-stack web developer using only JavaScript.

If you decide you’d rather try out Google’s programming language, building a basic web server is a great starter project.


featured image for Go web server
How to create a basic web server in Go

Ready, Ready, Golang: Start building web servers with Go.

Read more


About the Author


Source link

GoAhead Developers Fix Embedded Web Server Null Byte Injection Vulnerability

Exploitation requires additional vulnerability or device misconfiguration

UPDATE Embedthis fixed a null byte injection vulnerability in GoAhead, the embedded web server deployed in hundreds of millions of devices.

“A specially crafted URL with an embedded character before the extension can result in an incorrect file with a truncated filename serving,” read a security advisory on GitHub documenting the bug.

Quoting the hypothetical URL https://example.com/example%00.html, the notice states that “the is decoded to be NULL”, causing the file manager to serve as “example” instead of ” example.html ”.

As a result, “remote attackers could access documents whose names are strict subsets of longer valid URLs.”

The advisory nonetheless describes the severity of the bug as “low” because “an exploit requires [either] additional vulnerability via downloaded malicious files ”or device configuration errors.

“Unlikely configuration”

The fault was discovered by Luc Rindel, infosec master’s student at Carnegie Mellon University, during a 2021 PlaidCTF challenge earlier this month that involved manipulating the values ​​of the camera and IoT sensor.

“The vulnerability abuses the mismatch between the scan of the route extension and the decoded filename to trick GoAhead into believing that a file should be sent to the JST [JavaScript Template] manager even if it has an incorrect extension, ”says Rindels The daily sip.

“GoAhead should only send .html files to the JST manager, but the vulnerability allows any file to be sent to the JST manager.”

While Rindels achieved XSS via a CSP bypass, it was done, he conceded, “using a highly personalized and unlikely setup.”

With the correct incorrect device configurations and ‘combined vulnerabilities required – this could cause a DoS or [an attacker to] take unwanted control of the device, ”said Michael O’Brien, CEO and founder of Embedthis. The daily sip.

Obstacles to exploitation

However, real-world exploitation appears to be an unlikely scenario.

The server must be misconfigured to “allow file downloads to a directory that can also run JST templates” and a JST template must be uploaded “to a file in the download directory of the same base name without the extension, ”before the file is served with it, O’Brien explains.

But “if an attacker can modify the configuration of the route, he already has access to the whole server and documents anyway”.

Keep up to date with the latest infosec research news

Additionally, the vulnerability “requires that a file with the same base name without an extension be present.” i.e. ‘example’ and example.html. Needless to say, most device manufacturers don’t and [it] It would be rather strange to do it on purpose.

JST expressions are also device-specific, he adds, so source code access is likely required as well.

Find the loophole

While looking for evidence of an incorrect extension analysis during CTF, Rindels realized that “the request URL must have been decoded, otherwise it couldn’t call with and delimiters,” Rindels says in a blog post published yesterday (April 26).

He suspected that a null byte exploit would fail, perhaps because “dangerous URL encodings like” would not be allowed or decoded, resulting in an error or an “attempt to serve.”

Alternatively, he speculated, “if the is decoded, in an extension request will simply be cut. There will be no overtime and GoAhead will attempt to serve.”

Undeterred, he downloaded a snapshot with the name containing, issued a request for, “and to my amazement the nuncio was there!”

Incidentally, the exploit failed to secure the CTF flag because Chrome blocks “URL encoded null bytes” but could pave the way for Rindels’ very first CVE.

Patching, attenuation

Embedthis fixed the vulnerability in GoAhead versions 4.1.4 and 5.1.2. Version 2.2 is not affected.

Embedthis “responded very quickly,” correcting the flaw on April 5, four days after it was reported, Rindels said.

In addition to applying the update, O’Brien urges users to avoid serving JST templates “from directories that do not overlap with download directories.” You should NEVER upload files to a directory that allows content to be served and JST models to be processed ”.

Vendor Says GoAhead is the World’s Most Popular Embedded Web Server, Hosting “Dynamic Embedded Web Applications Through a Single-Threaded, Event-Driven Kernel” in medical devices, network equipment and automation systems factory, among other devices.

This article was updated on April 28 with comments from Embedthis CEO Michael O’Brien.

DON’T FORGET TO READ Pwn2Own 2021: Zoom exploit without click among winners as payout record was broken



Source link

How to create a basic web server in Go

Go is an exciting programming language for building modern web applications as well as system software. It swept the tech industry upon its release and powers services like Docker, Kubernetes, Terraform, Dropbox, and Netflix.

Plus, Go’s solid collection of built-in packages make it a great choice for web programming. This article will teach you how to write a basic web server in Go.

Importing the necessary packages

The net / HTTP package provides everything needed to create web servers and clients. This package exposes several useful functions for handling web programming.

You can import it by adding the line below at the top of your source code:

import "net/http"

We will also use the fmt package for formatting strings and Newspaper package to handle errors. You can either import them individually as shown above, or factor all packages using a single import statement:

import (
"fmt"
"log"
"net/http"
)

You can proceed to write the main function after importing the required packages. Go ahead and save the source file with a .go extension. If you are using Vim, use the command below to save and exit Vim:

:wq server.go

Writing the main function

Go programs live in the main function, aptly named “main”. You will need to implement the server call here. Add the following lines to your source code and see what they do:

func main() {
http.HandleFunc("https://www.makeuseof.com/", index)
log.Fatal(http.ListenAndServe(":8080", nil))
}

We define the main function using the function keyword. Go has strict rules regarding the placement of the opening splint, so make sure the starting splint is on the correct line. The first statement in main defines that all web requests arriving at root (“https://www.makeuseof.com/”) the path will be managed by index, a function of the type http.HandlerFunc.

The second line starts the web server through the http.ListenAndServe function. It signals the server to constantly listen for incoming HTTP requests on port 8080 of the host machine. The second parameter of this function is necessary to block the program until the end.

Since http.ListenAndServe always returns an error, we wrap this call in a log.Fatal call. This statement logs all error messages generated on the server side.

Implementing the manager function

As you can see, the main function calls the index of the manager’s function to process customer requests. However, we have not yet defined this function for our server.

Let’s add the instructions needed to make the index function usable:

func index(w http.ResponseWriter, r *http.Request) {
fmt.Fprintf(w, "Hi there, welcome to %s!", r.URL.Path[1:])
}

This function takes two different arguments of type http.ResponseWriter and http.Query. The http.ResponseWriter parameter contains the server’s response to the incoming request, which is in the form of an http.Request object.

The Fprintf function of the fmt package is used to display and manipulate text strings. We use it to display the server response to our web requests. Finally, the r.URL.Path[1:] The component is used to retrieve data that comes after the root path.

Add all parts together

Your Go web server should be ready once you’ve added everything together. The code should look like the following:

package main
import (
"fmt"
"log"
"net/http"
)
func index(w http.ResponseWriter, r *http.Request) {
fmt.Fprintf(w, "Hi there, welcome to %s!", r.URL.Path[1:])
}
func main() {
http.HandleFunc("https://www.makeuseof.com/", index)
log.Fatal(http.ListenAndServe(":8080", nil))
}

The first line is required to compile this Go web server code as an executable file.

Simple web server built with Go

Create web servers with Go

Go’s robust library packages make web programming easy for beginners. You can quickly develop simple web servers with just a few lines of code.

In addition, the powerful testing features of this programming language also facilitate the implementation of Agile programming methodologies. It is a group of software development strategies based on iterative development and extensive collaboration between teams.


People collaborating at a table
What is the Agile Programming Methodology?

Whether you are applying for programming positions or want a more efficient way of working, you need to know Agile.

Read more


About the Author


Source link

Web Server Log Analysis Tools for 2021

Modern organizations track and record data from virtually every business process, which is why web server log analysis tools are essential for effectively using this information to get a clear picture of your network state. . Event logs, security logs, transactions, web server uptime, and CDN traffic are just a few of the types of logs you will collect.

Why do i need a web server log analyzer?

So why do you need a web server log analyzer? All of this data can quickly become overwhelming. To maximize data usage, you need to be able to easily find and analyze log files from a central location. Web log analysis tools allow you to filter logs, perform real-time searches, and query specific log data. These tools also present this data in a centralized view accessible from anywhere.

In some cases, analysis tools will also provide log management capabilities. Instead of inspecting data after it is saved, log management deals with how you manage that data. This can mean creating policies on how you generate and store logs or automating when logs are archived after a certain amount of time.

Pros and Cons of the 4 Best Web Log Analysis Tools

We’ve compiled a list of four web log analysis tools to help you start your research and get the most out of your log file data.

SolarWinds Loggly

SolarWinds Loggly is a SaaS log analytics and management provider focused on simplifying the log management process to alleviate some of the burden on system administrators and DevOps. Loggly can be used with Amazon AWS, Microsoft Azure, hybrid cloud environments, IoT systems, and microservices.

Advantages: Loggly’s dynamic field explorer, combined with its full-text searches, ranges, and Booleans, makes it easy to analyze large amounts of data and find the information you need. It also provides robust graphs and reports so that you can identify trends and identify unique network activity and root causes of issues.

The inconvenients: The basic plan is reasonably priced, but some great features, such as the LiveTail feature, are only available at an additional cost. So, the overall price may increase quickly depending on the number of features you need.

Graylog

Graylog is an open source tool designed to simplify data mining, compliance, and threat hunting. There is also a business version of Graylog, the price of which is based on the number of licenses on a server. Its flexible tool includes a REST API.

Advantages: This tool is popular for its seamless scalability, so it can grow exponentially with web properties. It has load balancing capabilities and can handle several terabytes of data per day. Its built-in fault tolerance allows multithreaded searches to analyze and correlate multiple potential threats simultaneously. This allows IT teams to quickly diagnose the root cause of issues.

The inconvenients: What Graylog lacks is its dashboard. Users find its visualizations and graphics limited.

Splunk

Splunk is a veteran in the field of newspaper management and analysis, since 2003. Its offerings are specifically tailored to large companies.

Advantages: Splunk makes delivering real-time data a priority. Not only can you search the logs in real time, but you can also configure thresholds and trigger conditions to send alerts in real time to reduce event resolution time. This tool also includes in-depth analyzes to support fast ad-hoc queries. Beyond log analysis, its log management capabilities shine among the competition. It includes powerful ways to determine how you will collect, store, index, and view log files.

The inconvenients: Splunk is expensive because it’s built for the business, but its biggest flaw is its ease of use. It’s a robust tool with a lot of advanced features, so there can be a steep learning curve.

Sumo Logic

Sumo Logic is a SaaS offering that takes log analytics technology into the future by implementing machine learning capabilities into its solution. The cloud-native solution analyzes over 100 petabytes of data every day.

Advantages: Sumo Logic’s machine learning technology unifies logs and metrics to provide real-time insight into business models to identify issues that need to be addressed and reveal new opportunities for improvement. You can also create predefined metric filters to identify anomalies in the network. Sumo Logic includes an intuitive dashboard to display graphical representations of anomalies and other system activity, and offers the ability to thoroughly filter logs.

The inconvenients: A constant problem with Sumo Logic is that searching the interface can be slow.

The benefits of log analysis tools

Efficient use of web log analysis tools can offer multiple benefits to make your job easier and keep your network efficient. Some of the benefits of log analysis tools include:

  • You can identify key trends and anomalies to gain a clear understanding of the health of your network and areas for improvement.
  • You can correlate event data with downtime on your network to identify the root cause of problems and resolve them quickly.
  • Use these logs to identify unauthorized user access or suspicious activity to prevent data breaches and locate entry points.
  • With all of your log files in one location, you’ll reduce the time you spend switching between different log locations to find the information most relevant to the task at hand.

How to Choose the Right Log Analysis Tool

When determining how to choose the right log analytics tool for your organization, focus on the specific features that will best address the issues you face.

Unique search features: Are you primarily focused on being able to find the log files you are looking for as quickly as possible? Then look for a tool with the most unique and robust search capabilities. These may include:

  • Filtering logs by server, application, or custom settings
  • Search for individual queries
  • Perform granular searches
  • Perform real-time searches

Dashboard: Do you want to have an overview of the state of your system at a glance? Some web log analysis tools make it a priority to provide a clear, easy-to-use dashboard so that you can easily switch between views to determine the health, safety, and efficiency of your business. system.

Log management: If you want to reduce your budget or the number of tools in your technology stack, look for analytics tools with built-in log management functionality to avoid implementing another stand-alone product.

Advanced technology: Do you want to make sure that your web log analytics tool is ready for the problems of the future? This can be of particular concern if safety is a priority. Some tools now integrate machine learning capabilities into their solutions to make your job even easier and keep your system efficient.


Source link

Web Server Log Analysis Tools for 2021

Modern organizations track and record data from virtually every business process, which is why web server log analysis tools are essential for effectively using this information to get a clear picture of your network state. . Event logs, security logs, transactions, web server uptime, and CDN traffic are just a few of the types of logs you will collect.

Why do i need a web server log analyzer?

So why do you need a web server log analyzer? All of this data can quickly become overwhelming. To maximize data usage, you need to be able to easily find and analyze log files from a central location. Web log analysis tools allow you to filter logs, perform real-time searches, and query specific log data. These tools also present this data in a centralized view accessible from anywhere.

In some cases, analysis tools will also provide log management capabilities. Instead of inspecting data after it is saved, log management deals with how you manage that data. This can mean creating policies on how you generate and store logs or automating when logs are archived after a certain amount of time.

Pros and Cons of the 4 Best Web Log Analysis Tools

We’ve compiled a list of four web log analysis tools to help you start your research and get the most out of your log file data.

SolarWinds Loggly

SolarWinds Loggly is a SaaS log analytics and management provider focused on simplifying the log management process to alleviate some of the burden on system administrators and DevOps. Loggly can be used with Amazon AWS, Microsoft Azure, hybrid cloud environments, IoT systems, and microservices.

Advantages: Loggly’s dynamic field explorer, combined with its full-text searches, ranges, and Booleans, makes it easy to analyze large amounts of data and find the information you need. It also provides robust graphs and reports so that you can identify trends and identify unique network activity and root causes of issues.

The inconvenients: The basic plan is reasonably priced, but some great features, such as the LiveTail feature, are only available at an additional cost. So, the overall price may increase quickly depending on the number of features you need.

Graylog

Graylog is an open source tool designed to simplify data mining, compliance, and threat hunting. There is also a business version of Graylog, the price of which is based on the number of licenses on a server. Its flexible tool includes a REST API.

Advantages: This tool is popular for its seamless scalability, so it can grow exponentially with web properties. It has load balancing capabilities and can handle several terabytes of data per day. Its built-in fault tolerance allows multithreaded searches to analyze and correlate multiple potential threats simultaneously. This allows IT teams to quickly diagnose the root cause of problems.

The inconvenients: What Graylog lacks is its dashboard. Users find its visualizations and graphics limited.

Splunk

Splunk is a veteran in the field of newspaper management and analysis, since 2003. Its offerings are specifically tailored to large companies.

Advantages: Splunk makes delivering real-time data a priority. Not only can you search the logs in real time, but you can also configure thresholds and trigger conditions to send alerts in real time to reduce event resolution time. This tool also includes in-depth analyzes to support fast ad-hoc queries. Beyond log analysis, its log management capabilities shine among the competition. It includes powerful ways to determine how you will collect, store, index, and view log files.

The inconvenients: Splunk is expensive because it’s built for the business, but its biggest flaw is its ease of use. It’s a robust tool with a lot of advanced features, so there can be a steep learning curve.

Sumo Logic

Sumo Logic is a SaaS offering that takes log analytics technology into the future by implementing machine learning capabilities into its solution. The cloud-native solution analyzes over 100 petabytes of data every day.

Advantages: Sumo Logic’s machine learning technology unifies logs and metrics to provide real-time insight into business models to identify issues that need to be addressed and reveal new opportunities for improvement. You can also create predefined metric filters to identify anomalies in the network. Sumo Logic includes an intuitive dashboard to display graphical representations of anomalies and other system activity, and offers the ability to thoroughly filter logs.

The inconvenients: A constant problem with Sumo Logic is that searching the interface can be slow.

The benefits of log analysis tools

Efficient use of web log analysis tools can offer multiple benefits to make your job easier and keep your network efficient. Some of the benefits of log analysis tools include:

  • You can identify key trends and anomalies to gain a clear understanding of the health of your network and areas for improvement.
  • You can correlate event data with downtime on your network to identify the root cause of problems and resolve them quickly.
  • Use these logs to identify unauthorized user access or suspicious activity to prevent data breaches and locate entry points.
  • With all of your log files in one location, you’ll reduce the time you spend switching between different log locations to find the information most relevant to the task at hand.

How to Choose the Right Log Analysis Tool

When determining how to choose the right log analytics tool for your organization, focus on the specific features that will best address the issues you face.

Unique search features: Are you primarily focused on being able to find the log files you are looking for as quickly as possible? Then look for a tool with the most unique and robust search capabilities. These may include:

  • Filter logs by server, application, or custom settings
  • Search for individual queries
  • Perform granular searches
  • Perform real-time searches

Dashboard: Do you want to have an overview of the state of your system at a glance? Some web log analysis tools make it a priority to provide a clear, easy-to-use dashboard so that you can easily switch between views to determine the health, safety, and efficiency of your business. system.

Log management: If you want to reduce your budget or the number of tools in your technology stack, look for analytics tools with built-in log management functionality to avoid implementing another stand-alone product.

Advanced technology: Do you want to make sure that your web log analytics tool is ready for the problems of the future? This can be of particular concern if safety is a priority. Some tools now integrate machine learning capabilities into their solutions to make your job even easier and keep your system efficient.


Source link

How to install WordPress on Lighttpd web server – Ubuntu 20.04 / 18.04

Lighttpd is a popular web server known for its fast speed and light weight. Just like Apache2, it is also very easy to install and use with PHP to run various web applications and content management systems such as WordPress.

Here today we will show the process of installing WordPress on Lighttpd with MySQL and PHP. So, follow the steps below to get started.

Steps to install and configure WordPress on Lighttpd web server

It doesn’t matter if you are on a local server or cloud hosting, the process will be the same for both. Here we are using Ubuntu 20.04, however, we can run it on Ubuntu 18.04 LTS server and other similar operating systems like Linux Mint, MX Linux and Debian.

Run the system update command

Let the system installed packages reach their last state by running the update and upgrade commands:

sudo apt update
sudo apt upgrade

Install Lighttpd for WordPress and other web applications

As we are using Ubuntu Linux here, so we don’t need to add any third party repository for installing Lighttpd web server. Everything is there on the official repo of this Linux, just run the command below:

sudo apt install lighttpd

Activate and check the status of Lighttpd

To make sure that the web server is automatically declared with system startup, we have to activate it every time. So, run the command below:

sudo systemctl enable lighttpd

Check the condition:

sudo systemctl status lighttpd

Now open the system browser or on any PC available in your network and type the IP address of the server where you installed the Lighttpd: http://ip-address

Install PHP

The command below installs not only PHP but also the plugins that we would need when using WordPress. However, when installing the same, apache2 will be installed automatically, so we ignore it.

sudo apt-get install php php-cgi php-cli php-fpm php-curl php-gd php-mysql php-mbstring zip unzip apache2-

Activate the FastCGI and FastCGI-PHP modules

Now everything is done, just one last thing before confirming that our PHP works fine with the Lighttpd web server which enables FastCGI extensions.

sudo lighty-enable-mod fastcgi fastcgi-php

Reload the service to apply the changes

sudo service lighttpd force-reload

Download and install MySQL

If you already have this MySQL or MariaDB database, you can skip this step, otherwise install it using the command below:

sudo apt install mysql-server

By default on Ubuntu 20.04 LTS, version 8 of Mysql will be available for installation.

Secure installation of MySQL

To make sure that our database server is secure and would not be easily compromised, run the MySQL secure command. This will remove demo users and databases, disable the remote root login, and allow you to configure a password for the MySQL root user.

sudo mysql_secure_installation

Create a database for Wordpres

Once you’re done securing your MySQL, run the following commands to create a database that we’ll use with our WordPress instance:

sudo mysql

Create a database that we use to store data from our website based on Wordpres CMS running on Lighttpd. Here in the command below light_word is the name of our database. You can change it with whatever you want.

create database `light_word` character set="utf8";

Now create a user to use with the database created above

create user 'demoh2s'@'localhost' identified by 'password';

The demoh2s is the username in the above command created on our system to access the database. Change the ‘password‘with the password you want to assign to your MySQL database user.

Finally, grant full permissions to the user to read, write, modify and delete data in the database. So, for this race:

GRANT ALL PRIVILEGES ON `light_word`.* to `demoh2s`@localhost;

Exit the MySQL command line:

exit

Download WordPress

Now we need to get ourselves the open source WordPress files that we need to set up this CMS on Lighttpd.

cd /tmp
wget https://wordpress.org/latest.zip

Create a folder in the webroot directory of Lighttpd

sudo mkdir /var/www/html/h2s

To note: You can change h2s in the syntax above with the name of the website you are installing WordPress for.

Extract the WordPress files, then move to the folder created above:

sudo unzip /tmp/latest.zip
sudo mv /tmp/wordpress/* /var/www/html/h2s

Now we have a directory inside the web root with a name h2s and all the files we need to use Wordpres inside.

Also give your Internet user all access to the created folder:

sudo chown -R www-data:www-data /var/www/html/h2s

Install WordPress on Lighttpd

Finally, go to your browser again and type IP address of the serer with the name of the directory where you extracted the WordPress file. If we follow the steps above, the directory name in our case is h2s. So, it will be like this: http://server-ip-address/h2s

Here is the screenshot to give you an idea:

Connection to the MySQL database min

Configure virtual host on Lighttpd

Now if you install it on hosting server or cloud and want to use domain or subdomain with Lighttpd, we need to create virtual host configuration file for them. So let’s say we want to use example.com for the WordPress instance created above.

To note: Replace example.com with your domain name.

Then create a configuration file for it

sudo nano /etc/lighttpd/example.com.conf

Add the following lines.

$HTTP["host"] =~ "example.com" {
server.document-root = "/var/www/html/h2s"
accesslog.filename = "/var/www/html/h2s/logs/access.log">
}

In the lines above, replace the Example with your domain name and .com with the TLD you have such as .com, .in, .org, etc. After that for /var/www/html/h2s– type the path of the folder where you have the WordPress files. If we follow our tutorial, the h2s is the folder where we extracted our files in the web root.

Now save it.

In the same way, we can create a subdomain configuration file. Once you’ve created all of that, it’s time to add them to Lighttpd’s main config file to tell it that, hey, “here are the files for the specific domain name and you need to serve them only”.

Open the Lighttpd configuration file:

sudo nano /etc/lighttpd/lighttpd.conf

Add the public IP address of your web server.

36.0.1.106 is just, for example, replacing it with your own.

server.bind = "36.0.1.106"

Bind the lighttpd server to the public IP address

Also include your domain configuration file:

include "example.com.conf"

Add a virtual host to lighttpd

After the changes, save the file and exit. Ctrl + X, hurry Yes, then press the Enter key.

Restart Lighttpd:

sudo systemctl restart lighttpd

In this way, we can use multiple domains to retrieve files hosted on a server delivered through the Lighttpd web server. You can read more about configuring Lighttpd virtual host from this Web page


Source link