Gilberto  Block

Gilberto Block

1595128860

How to Set Up Apache Virtual Hosts on CentOS 7

Apache Virtual Hosts allows multiple websites to run on one Web server. With virtual hosts, you can specify the site document root (the directory which contains the website files), create a separate security policy for each site, use different SSL certificates for each site and much more.

In this tutorial, we’ll provide a step by step instructions about how to set up Apache Virtual Hosts on a CentOS 7 server.

Prerequisites

Make sure you met the following prerequisites before continuing with this tutorial:

Creating Directory Structure

DocumentRoot is the directory where the website files for a domain name are stored and served in response to requests. You can set the document root to any location you want, this example we will use the following directory structure:

/var/www/
├── example.com
│   └── public_html
├── example-1.com
│   └── public_html
├── example-2.com
│   └── public_html

We’re creating a separate directory for each domain we want to host on our server inside the /var/www directory. Within each of these directories, we will create a public_html directory that will store the domain website files.

Create the root directory for the domain example.com using the mkdir command :

sudo mkdir -p /var/www/example.com/public_html

For testing purposes we will create an index.html file inside the domain document root directory. Open your editor and create a HTML file with the following contents:

/var/www/example.com/public_html/index.html

<!DOCTYPE html>
<html lang="en" dir="ltr">
  <head>
    <meta charset="utf-8">
    <title>Welcome to example.com</title>
  </head>
  <body>
    <h1>Success! example.com home page!</h1>
  </body>
</html>

Copy

All commands are executed as sudo user, so the newly created files and directories are owned by the root user. To make sure there are no permission issues, change the ownership of the domain document root directory to the apache user :

sudo chown -R apache: /var/www/example.com

#apache

What is GEEK

Buddha Community

How to Set Up Apache Virtual Hosts on CentOS 7

How To Set Up Apache Virtual Hosts on Ubuntu 18.04

In this tutorial, we’ll provide a step by step instructions about how to set up Apache Virtual Hosts on Ubuntu 18.04.

Apache Virtual Hosts allows you to run more than one website on a single machine. With Virtual Hosts, you can specify the site document root (the directory which contains the website files), create a separate security policy for each site, use different SSL certificates and much more.

Although this tutorial is written for Ubuntu 18.04 Bionic Beaver the same steps can be used for Ubuntu 16.04 Xenial Xerus.

Prerequisites #

#ubuntu 18.04 #apache #apache virtual hosts

Install Docker and Learn Basic Container Manipulation in CentOS and RHEL 8/7 - Part 1

In this 4-article series, we will discuss Docker, which is an open-source lightweight virtualization tool that runs at top of Operating System level, allowing users to create, run and deploy applications, encapsulated into small containers.

This type of Linux containers are proven to be fast, portable, and secure. The processes that run in a Docker container are always isolated from the main host, preventing outside tampering.

Part 1Install Docker and Learn Basic Container Manipulation in CentOS and RHEL 8/7

Part 2:How to Deploy and Run Applications into Docker Containers on CentOS/RHEL 8/7

Part 3: Automatically Build and Configure Docker Images with Dockerfile on CentOS/RHEL 8/7

Part 4: How to Monitor Docker Containers in Linux

This tutorial provides a starting point on how to install Docker, create and run Docker containers on CentOS/RHEL 8/7, but barely scratches the surface of Docker.

Step 1: Install and Configure Docker

1. Earlier versions of Docker were called docker or docker-engine, if you have these installed, you must uninstall them before installing a newer docker-ce version.

# yum remove docker \
                  docker-client \
                  docker-client-latest \
                  docker-common \
                  docker-latest \
                  docker-latest-logrotate \
                  docker-logrotate \
                  docker-engine

2. To install the latest version of the Docker Engine you need to set up the Docker repository and install the yum-utils package to enable Docker stable repository on the system.

# yum install -y yum-utils
# yum-config-manager \
    --add-repo \
    https://download.docker.com/linux/centos/docker-ce.repo

3. Now install the newer docker-ce version from the Docker repository and containerd manually, because due to some issues, Red Hat blocked the installation of containerd.io > 1.2.0-3.el7, which is a dependency of docker-ce.

# yum install https://download.docker.com/linux/centos/7/x86_64/stable/Packages/containerd.io-1.2.6-3.3.el7.x86_64.rpm
# yum install docker-ce docker-ce-cli

#centos #docker #redhat #virtualization #centos tips #docker tips #rhel tips #virtualization

Gilberto  Block

Gilberto Block

1595128860

How to Set Up Apache Virtual Hosts on CentOS 7

Apache Virtual Hosts allows multiple websites to run on one Web server. With virtual hosts, you can specify the site document root (the directory which contains the website files), create a separate security policy for each site, use different SSL certificates for each site and much more.

In this tutorial, we’ll provide a step by step instructions about how to set up Apache Virtual Hosts on a CentOS 7 server.

Prerequisites

Make sure you met the following prerequisites before continuing with this tutorial:

Creating Directory Structure

DocumentRoot is the directory where the website files for a domain name are stored and served in response to requests. You can set the document root to any location you want, this example we will use the following directory structure:

/var/www/
├── example.com
│   └── public_html
├── example-1.com
│   └── public_html
├── example-2.com
│   └── public_html

We’re creating a separate directory for each domain we want to host on our server inside the /var/www directory. Within each of these directories, we will create a public_html directory that will store the domain website files.

Create the root directory for the domain example.com using the mkdir command :

sudo mkdir -p /var/www/example.com/public_html

For testing purposes we will create an index.html file inside the domain document root directory. Open your editor and create a HTML file with the following contents:

/var/www/example.com/public_html/index.html

<!DOCTYPE html>
<html lang="en" dir="ltr">
  <head>
    <meta charset="utf-8">
    <title>Welcome to example.com</title>
  </head>
  <body>
    <h1>Success! example.com home page!</h1>
  </body>
</html>

Copy

All commands are executed as sudo user, so the newly created files and directories are owned by the root user. To make sure there are no permission issues, change the ownership of the domain document root directory to the apache user :

sudo chown -R apache: /var/www/example.com

#apache

Linux Reseller Hosting

Cloudminister provides services that help clients in improvising their website performance. The company is best known for offering the best Linux Reseller Hosting Plans at an affordable price. The Linux Reseller Hosting Plans, the company offers is the dream of every client which can only be fulfilled by contacting Cloudminister. Various plans are offered which are distributed according to the requirement and the client. The solutions the company provides is unimaginable because it includes Free Full Weekly Backup, SSD Storage, Firewall Security, Free Fully Managed Support, Free Migration, and the list goes on.

Our solutions are featured with

  • FREE Full Daily Backup
  • FREE Let’s Encrypt SSL
  • SSD Storage
  • FREE Softaculous Auto Installer
  • FREE Migration
  • FREE Fully Managed Support
  • 99.99% Uptime Guarantee
  • Firewall Security

#best linux reseller hosting #linux reseller hosting plan #reseller hosting in india #cheap linux reseller hosting #best reseller hosting india #cloud reseller hosting india

Java Questions

Java Questions

1590502070

How To Install PyCharm on CentOS 7 and 8

PyCharm is an IDE (or Integrated Development Environment) for the Python programming language. It is a cross-platform development environment that is compatible with Windows, macOS, and Linux. It provides a tool that integrates code analysis, graphical debugging, unit testing, and also contains an integrated terminal that supports development on remote hosts and virtual machines.

PyCharm was created by JetBrains based on the IntelliJ IDEA platform. There are two main versions of PyCharm.

The PyCharm Community Edition – This version is used for development without the framework options and other features that are necessary for writing Enterprise solutions.
The PyCharm Professional Edition – This version is used to develop software for large projects where frameworks and additional libraries are needed. This version contains support for Scientific and Python development and supports HTML, JS, and SQL.
For successful developers, it is crucial to have excellent tools that lessen their workload and save time. Additionally, PyCharm utilizes various plugins and extensions, written by both IntelliJ IDEA and other third-party contributors to increase functionality. The Professional Edition has a free trial period during which users can familiarize themselves with it and its use or the open-source Community Edition which allows for continued free usage.

#centos #centos 7 #centos 8 #code analysis #cross platform