XAMPP

How to Enable HTTP/2 in Apache XAMPP

How to Enable HTTP/2 in Apache XAMPP

The HTTP/2 protocol is faster than HTTP/1.1 because it can handle resource queues and handle them simultaneously. HTTP/2 uses a single TCP connection to send multiple streams of data at once so that one resource does not block another resource. HTTP/2 does this by splitting the data into binary coded messages and numbering these messages so the client knows which stream each binary message belongs to. Whereas HTTP/1.1 loads resource one by one, so if one resource can't be loaded it will block all other resources behind it. Therefore HTTP/2 has better performance and speed than HTTP/1.1 If you want to enable HTTP/2 on the Apache Web server, you can follow the guide that Bardimin made below. 1. Enabling Apache HTTP/2 Module As a first step, you need to enable the HTTP/2 module on Apache. Open the file “ httpd.conf ” which is the main configuration file of Apache. If you are using XAMPP, you can find it in “ C:\ xampp \apache\conf\ httpd.conf ”. Look for " mod_http2.so " and uncomment the line by removing the " # " sign . ............. LoadModule http2_module modules/mod_http2.so ............. 2. Enable HTTP/2 Globally You can enable the HTTP/2 protocol globally. If you enable it globally, all connections from the Apache Webserver will use that protocol. To enable it, you just need to add the following directive at the end of the “ httpd.conf ” file or in “ C:\ xampp \apache\conf\ httpd.conf ” if you are using XAMPP. Protocols h2 h2c http/1.1 3. Enable HTTP/2 on certain...

Real-Time Application Dashboard with Yii2, Node.js, MySQL and Chart.js

Real-Time Application Dashboard with Yii2, Node.js, MySQL and Chart.js

In this article we will create a dashboard that can display graphics from data in real-time. The data we use as simulations is the population of a city. If you update your resident data, add or delete it, the graphic will change in real-time without the need to refresh from the page. Before we begin, we need to prepare: Webserver is installed, see How to Configure Virtual Host XAMPP in Windows 10.Yii2 is installed, see How to Install Yii2 Advanced via Composer.Node.js is already installed, see Create real-time applications with Nodes.js.Chart.js. Steps to Create a Real Time Application Dashboard with Yii2, Node.js, MySQL and Chart.js A. Create a table with MySQL Create tables with the name "city", and columns with the names "id" and "population". Or it's easier to run the following sql scripts. CREATE TABLE 'city' ( 'id' CHAR(16) NOT NULL PRIMARY KEY, 'population' INT(11) NOT NULL DEFAULT '0' ) ENGINE=InnoDB DEFAULT CHARSET=utf8; B. Create a Node server.js Set up a Node server.js as in Creating real-time applications with Nodes.js.In the "server.js" file, what we need to create is an "API" that will update the data on the graph we create with the Chart.js after the data is successfully stored by Yii.When the user first opens the dashboard page, we check whether the initial data for the dasboard graph is available, if not Yii will send the initial data. app.post('/status', (req, res) => { res.send(isInitData); }); app.post('/initData', (req, res) => { if(!isInitData){ myData...

How to Install Yii2 Advanced via Composer

How to Install Yii2 Advanced via Composer

The main reason for migrating to Yii2 Advanced Template is for the implementation of user management features such as listing, login, exit, and password reset. Yii2 Advanced Template also has front-end and back-end web applications for end-users and administrators. However, this can also be expanded—for example for dedicated moderators or APIs, although there are other ways to integrate these features in a single app. Here is a chart showing the main differences between Yii2 basic and advanced: FeaturedBasicAdvancedProject structure✓✓Site controller✓✓User login/logout✓✓Forms✓✓DB connection✓✓Console command✓✓Asset bundle✓✓Codeception tests✓✓Twitter Bootstrap✓✓Front- and back-end apps✓Ready to use User model✓User signup and password restore✓ To start the installation yii2 advanced template requires a web server that supports PHP version +5.4.0. For this article, we will use XAMPP as a webserver. Since we're going to use composer, make sure you've installed composer. If not, you can download it here. In this example: XAMPP installed on C:\xamppYii2 Advanced installed on D:\xampp\htdocs\yii2-test Install Yii2 Advanced Templated via Composer Open command prompt (CMD) change to htdocs directory. For example "cd C:\xampp\htdocs", then you can install the yii2 application using the following command: composer global require "fxp/composer-asset-plugin:~1.1.1" composer create-project --prefer-dist yiisoft/yii2-app-advanced yii-application The first command installs the composer asset...

FREE OF CHARGE!!! SSL certificates with Let’s Encrypt and Apache

FREE OF CHARGE!!! SSL certificates with Let’s Encrypt and Apache

Secure Sockets Layer (SSL)is a cryptographic protocol designed to provide the security of communication over a computer network. SSL works by creating an encrypted path between the website and the web browser. The usability of creating SSL for websites not only serves to secure the website from eavesdropping attacks. Encrypted messages will secure the data delivered between the user and the server. In addition, the existence of SSL in your domain greatly facilitates or gives confidence to visitors to your site or website. URLs that use HTTPS will have a padlock icon on the web browser. In this article, we will help you to configure Let's Encrypt in Windows and how you can enable and configure SSL certificates on your Apache webserver. Prerequisites of need: Computer with windows/windows server.Apache 2.4/XAMPP is installed on C:xamppapache.Already have a domain connected to your webserver. 1. Download win-acme Let's Encrypt We will use ACMEv2 to get a free SSL certificate. Download win-acme and extract the download zip file at C:win-acme. 2. Run win-acme Let's Encrypt Run win-acme in C:win-acmewacs.exe as administrator. 3. Create an SSL certificate Select M to create a certificate Then select option 2: Manual input Next fill in the domain name, for example, "bardimin.com", press enter to continue. Then select the option "1: [http-01] Serve verification files on (network) path" After that fill in the directory location of the root domain, "C:xampphtdocs" If the question...

How to Configure XAMPP Virtual Host in Windows 10

How to Configure XAMPP Virtual Host in Windows 10

The term Virtual Host refers to the practice of running more than one website (such as example1.com and example2.com) on a single machine. A virtual host can be "IP-based", meaning you have a different IP address for each website, or "name-based", meaning you have multiple names running on each IP address. The fact that they run on the same physical server is invisible to the end-user. Apache was one of the first servers to support IP-based virtual hosts. Apache version 1.1 and later support IP-based and name-based virtual hosts (vhosts). The last variant of a virtual host is sometimes also called a host-based virtual host or non-IP. Virtual Host Configuration on XAMPP XAMPP Control Panel Open the Apache Virtual Hosts configuration file in the XAMPP installation directory (for example) in "C:\xampp\apache\conf\extra\httpd-vhosts.conf"Add the following code at the end of the file <VirtualHost *:80> ServerName www.example1.com DocumentRoot "C:\XAMPP\htdocs" <Directory "C:\XAMPP\htdocs"> Options Indexes FollowSymLinks Includes ExecCGI Order allow,deny Allow from all </Directory </VirtualHost> Add a setting at the end of a windows host file in "C:\Windows\System32\drivers\etc\host". 127.0.0.1 www.example1.com Virtual Configuration hosts multiple domains with one public IP For example, we have 2 domains with www.example1.com and www.example2.com names.Add the following code at the end of the httpd-vhosts.conf file <VirtualHost *:80> ServerName www.example1.com...