HTTPS with virtual hosts on XAMPP

Creating an SSL certificate

  1. Go to the Apache directory C:\xampp\apache.
  2. Run makecert.
  3. Enter a PEM passphrase and the other information you are asked for. For Common Name, you should enter the domain you want to use for the virtual host, so the certificate is signed for that domain.
  4. After processing all steps, you maybe want to import the cert into your browser (it lives under C:/xampp/apache/conf/ssl.crt/server.crt). Nevertheless, you will get a warning about insecure self-signed certificate after loading your website – you need to add it as an exception.

Entry in the Windows hosts file

To let Windows know, for example, that the domain mysite.dev should point to the IP address 127.0.0.1 (localhost), we have to insert an entry in the Windows hostsfile. The file can be found in C:\Windows\System32\drivers\etc. To edit it, you need admin privileges (search for the editor in Windows, right-click on it and choose Run as administrator).

At the end of the hosts file, add an entry with the following pattern:

127.0.0.1 mysite.dev

You have to replace the domain with your own development domain. Afterwards, you can save and close the file.

You have to replace the domain with your own development domain. Afterwards, you can save and close the file.

Creating the Virtual Host in Apache

<VirtualHost mysite.dev:80>
DocumentRoot “C:\xampp\htdocs\mysite.dev”
ServerName mysite.dev
<Directory “C:\xampp\htdocs\mysite.dev”>
Order allow,deny
Allow from all
</Directory>
</VirtualHost>

<VirtualHost mysite.dev:443>
DocumentRoot “C:\xampp\htdocs\mysite.dev”
ServerName mysite.dev
SSLEngine On
SSLCertificateFile “C:/xampp/apache/conf/ssl.crt/server.crt”
SSLCertificateKeyFile “C:/xampp/apache/conf/ssl.key/server.key”
<Directory “C:\xampp\htdocs\mysite.dev”>
Order allow,deny
Allow from all
</Directory>
</VirtualHost>

Maybe you have to uncomment the following line in the

C:\xampp\apache\conf\httpd.conf:

LoadModule ssl_module modules/mod_ssl.so

set up mail poet task scheduler curl issue

===================/etc/hosts======================

127.0.0.1 localhost
127.0.1.1 guest

# The following lines are desirable for IPv6 capable hosts
::1 localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

149.28.54.181 xxxxxxxx.org
127.0.0.1 xxxxxxxx.org
::1 xxxxxxxx.org
=======================================end===============================
set up https://xxxxxxx:8083/list/firewall/ add this below…

ACCEPT TCP/ WEB 80,443 0.0.0.0/0

Update VestaCP to PHP 7 on CentOS 7

First let’s make sure your server is up to date.

sudo yum update

Now we make sure that yum-utils is installed

sudo yum install yum-utils

If it’s already installed, great move on to the next step, if not then allow it to install.
Now we can enable remi-php70
sudo yum-config-manager –enable remi-php70

Now we can tell yum to update, this will upgrade our old version of PHP to 7
sudo yum update

sudo service php-fpm restart

php -v

How To Install and Configure Redis on Ubuntu 16.04

I’ll show you, how to install and configure Redis on Ubuntu 16.04. Redis is an in-memory data structure store primarily used as a database and cache. Installing Redis on Ubuntu 16.04 is an easy task, just follow the steps bellow and you should install, configure and use Redis on Ubuntu 16.04.

1. Connect via SSH
Connect to your Linux server via SSH, resynchronize the package index files from their sources and install the newest versions of all packages that are currently installed on your server by using the following commands:

sudo apt-get update
sudo apt-get upgrade
Once the upgrade is completed you can move on to the next step.

2. Install Redis on Ubuntu 16.04
Installing Redis on an Ubuntu VPS is simple. Run the command below to install Redis on your machine:

sudo apt-get install redis-server
If you are planning on using Redis as an object cache for WordPress or any other PHP-based application, you need to install the following package too:

sudo apt-get install php-redis
3. Configure Redis as a cache on Ubuntu 16.04
To configure Redis as a cache you need to edit the /etc/redis/redis.conf file. We will use nano as a text editor for this purpose, but you can use any text editor of your choice.

sudo nano /etc/redis/redis.conf
To configure the max memory for Redis as well as how Redis will select what to remove when the max memory is reached, add the following lines at the end of the file:

maxmemory 128mb
maxmemory-policy allkeys-lru
In this example, Redis will remove any key according to the LRU algorithm when the max memory of 128mb is reached. Save and close the file, then restart the Redis service:

sudo systemctl restart redis-server.service
Next, enable Redis on system boot:

sudo systemctl enable redis-server.service

install laravel on ubuntu 16 nginx php7 server

apt update && apt upgrade
curl -sS https://getcomposer.org/installer | php
mv composer.phar /usr/local/bin/composer
chmod +x /usr/local/bin/composer

Following are required extension for php 7 laravel app installation
sudo apt-get install php7.0-gd
sudo apt-get install php7.0-intl
sudo apt-get install php7.0-xsl
sudo apt-get install php7.0-bcmath
sudo apt-get install php7.0-mbstring php7.0-xml composer unzip

enabled gd extension by the following command
sudo phpenmod gd

# cd /var/www/html/your_website
# git clone https://github.com/laravel/laravel.git
# mv laravel/* .
# mv laravel/.* .
#rmdir laravel/
composer install

php artisan key:generate

The API based drivers such as Mailgun and SparkPost are often simpler and faster than SMTP servers. If possible, you should use one of these drivers. All of the API drivers require the Guzzle HTTP library, which may be installed via the Composer package manager:
composer require guzzlehttp/guzzle

clear cache on laravel by using the following command
php artisan cache:clear