How To Install Phoenix Framework on CentOS 7

Phoenix Framework on CentOS 7

Phoenix is an emerging Elixir-based web development framework. It is intended to supply high development productivity, rich features, and strong runtime functionality.

Table of Contents

Step 1. First let’s start by ensuring your system is up-to-date.

Step 2. Installing Required Packages.

Step 3. Installing Erlang.

Step 3. Installing Elixir.

Step 4. Installing Phoenix Framework.

Step 5. Installing PostgreSQL.

Step 6. Installing inotify-tools.

Step 7. Create a Phoenix application.

Step 8. Accessing Phoenix Framework.

Prerequisites

This article assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root accge of Linount, if not you may need to add ‘sudo’ to the commands to get root privileges. I will show you through the step by step installation the Phoenix Framework on a CentOS 7 server.
Install Phoenix Framework on CentOS 7

Step 1. First let’s start by ensuring your system is up-to-date.

yum clean all
yum -y install epel-release
yum -y update

Step 2. Installing Required Packages.

Install necessary packages:

yum install gcc gcc-c++ glibc-devel make ncurses-devel openssl-devel autoconf java-1.8.0-openjdk-devel wxBase.x86_64

Step 3. Installing Erlang.

First, Add Erlang official repository to install the latest Erlang:

wget http://packages.erlang-solutions.com/erlang-solutions-1.0-1.noarch.rpm
rpm -Uvh erlang-solutions-1.0-1.noarch.rpm

Install Erlang using command:

yum update
yum install erlang

Verify whether Erlangis installed or not by using the following command:

erl

Step 3. Installing Elixir.

First, Git clone to the Elixir repository:

git clone https://github.com/elixir-lang/elixir.git

Next, Go to the elixir directory:

cd elixir/
make clean test

Now, It is highly recommended to add Elixir’s bin path to your PATH environment variable:

export PATH="$PATH:/root/elixir/bin"

Verify whether Elixiris installed or not by using the following command:

iex

Step 4. Installing Phoenix Framework.

Use the following command to install Phoenix:

mix archive.install https://github.com/phoenixframework/archives/raw/master/phoenix_new.ez

Step 5. Installing PostgreSQL.

You can install PostgreSQL using YUM:

yum install -y postgresql-server
postgresql-setup initdb

Start the postgresql service:

systemctl start postgresql.service
systemctl enable postgresql.service

Set a password for the default PostgreSQL user “postgres”:

sudo -u postgres psql

Setup the database user authentication method:

nano /var/lib/pgsql/data/pg_hba.conf

Find the following section:

# IPv4 local connections:
host all all 127.0.0.1/32 ident
# IPv6 local connections:
host all all ::1/128 ident

Modify the authentication method of IPv4 local connections to md5:

# IPv4 local connections:
host all all 127.0.0.1/32 md5
# IPv6 local connections:
host all

Restart the postgresql service to take effect:

systemctl restart postgresql.service

Step 6. Installing inotify-tools.

Use the following command to install a required component “inotify-tools”:

yum install inotify-tools

Step 7. Create a Phoenix application.

Assume that you want to create a Phoenix application in the directory ~/idroot_project_1:

mix phoenix.new ~/wpcademy_project_1

This command will create the application directory ~/idroot_project_1 for you. Get into the directory and create a database:

cd ~/wpcademy_project_1
mix ecto.create

Fire up your application with the following command:

mix phoenix.server

Step 8. Accessing Phoenix Framework.

Phoenix Framework will be available on HTTP port 4000 by default. Open your favorite browser and navigate to http://yourdomain.com:4000/ or http://server-ip:4000 and complete the required the steps to finish the installation.

Congratulation’s! You have successfully installed Phoenix Framework. Thanks for using this tutorial for installing Phoenix Framework on CentOS 7 systems. For additional help or useful information, we recommend you to check the official Phoenix Framework web site.

How To Install JuliaLang on CentOS 7

JuliaLang on CentOS 7

Julia, commonly called JuliaLang, is a programming language for numerical computing. Julia is as fast as C but it doesn’t forfeit the readability. Therefore, we can decrease the running time of our programs in addition to the evolution time.

Table of Contents

Step 1. First let’s start by ensuring your system is up-to-date.

Step 2. Installing Required Packages.

Step 3. Installing JuliaLang.

 

Prerequisites

This article assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root accge of Linount, if not you may need to add ‘sudo’ to the commands to get root privileges. I will show you through the step by step installation the JuliaLang on a CentOS 7 server.
Install JuliaLang on CentOS 7

Step 1. First let’s start by ensuring your system is up-to-date.

yum clean all
yum -y install epel-release
yum -y update

Step 2. Installing Required Packages.

Install necessary packages:

yum-config-manager --add-repo https://copr.fedorainfracloud.org/coprs/nalimilan/julia/repo/epel-7/nalimilan-julia-epel-7.repo

Step 3. Installing JuliaLang.

Install Julia using following command:

yum install julia

New versions are built every night. If you have already installed julia and you want to upgrade to the latest version, do:

yum upgrade julia

Verify JuliaLang:

Type ./julia –version in the command prompt and the output should look like this:

julia version 0.6.0

Congratulation’s! You have successfully installed JuliaLang. Thanks for using this tutorial for installing JuliaLang on CentOS 7 systems. For additional help or useful information, we recommend you to check the official JuliaLang web site.

How To Install HipHop Virtual Machine on CentOS 7

HipHop Virtual Machine on CentOS 7

HipHop Virtual Machine (HHVM) is a virtual machine developed and open sourced by Facebook to process and execute programs and scripts written in PHP. Facebook developed HHVM because the regular Zend+Apache combination isn’t as efficient to serve large applications built in PHP.

Table of Contents

Step 1. First let’s start by ensuring your system is up-to-date.

Step 2. Installing Required Dependency.

Step 3. Installing HipHop Virtual Machine (HHVM) on CentOS 7.

Step 4. Config Setup HHVM.

 

Prerequisites

This article assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root accge of Linount, if not you may need to add ‘sudo’ to the commands to get root privileges. I will show you through the step by step installation the HipHop Virtual Machine (HHVM) on a CentOS 7 server.
Install HipHop Virtual Machine on CentOS 7

Step 1. First let’s start by ensuring your system is up-to-date.

yum clean all
yum -y update

Step 2. Installing Required Dependency.

Install the dependencies for the HHVM installation:

yum localinstall http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm
yum localinstall http://rpms.famillecollet.com/enterprise/remi-release-7.rpm
yum install cpp gcc-c++ cmake3 git psmisc {binutils,boost,jemalloc,numactl}-devel \
{ImageMagick,sqlite,tbb,bzip2,openldap,readline,elfutils-libelf,gmp,lz4,pcre}-devel \
lib{xslt,event,yaml,vpx,png,zip,icu,mcrypt,memcached,cap,dwarf}-devel \
{unixODBC,expat,mariadb}-devel lib{edit,curl,xml2,xslt}-devel \
glog-devel oniguruma-devel ocaml gperf enca libjpeg-turbo-devel openssl-devel \
mariadb mariadb-server {fastlz,double-conversion,re2}-devel make -y

Step 3. Installing HipHop Virtual Machine (HHVM) on CentOS 7.

Ok now we have the server ready lets get and build hhvm:

cd /tmp
git clone https://github.com/facebook/hhvm -b master hhvm --recursive
cd hhvm

Time to build:

cmake \
-DLIBMAGICKWAND_INCLUDE_DIRS="/usr/include/ImageMagick-6" \
-DLIBMAGICKCORE_LIBRARIES="/usr/lib64/libMagickCore-6.Q16.so" \
-DLIBMAGICKWAND_LIBRARIES="/usr/lib64/libMagickWand-6.Q16.so" .
make -j$(($(nproc)+1))
./hphp/hhvm/hhvm --version
sudo make install

Step 4. Config Setup HHVM.

First create some folders:

mkdir /etc/hhvm
mkdir /var/run/hhvm
mkdir /var/log/hhvm
mkdir /var/tmp/hhvm
mkdir -p /usr/share/hhvm/hdf/
chmod 775 /var/run/hhvm
chmod 777 /var/tmp/hhvm

Next add some config files:

nano /etc/hhvm/server.hdf

Add following files:

PidFile = /var/run/hhvm/pid
Server {
Port = 9000
SourceRoot = /var/www/
DefaultDocument = index.php
}
Log {
Level = Warning
AlwaysLogUnhandledExceptions = true
RuntimeErrorReportingLevel = 8191
UseLogFile = true
UseSyslog = false
File = /var/log/hhvm/error.log
Access {
* {
File = /var/log/hhvm/access.log
Format = %h %l %u % t \"%r\" %>s %b
}
}
}
Repo {
Central {
Path = /var/tmp/hhvm/.hhvm.hhbc
}
}
#include "/usr/share/hhvm/hdf/static.mime-types.hdf"
StaticFile {
FilesMatch {
* {
pattern = .*\.(dll|exe)
headers { 
* = Content-Disposition: attachment 
}
}
}
Extensions : StaticMimeTypes
}
MySQL {
TypedResults = false
}

Next, Adding the service:

nano /usr/lib/systemd/system/hhvm.service

Add following files:

[Unit]
Description=HHVM HipHop Virtual Machine (FCGI)
[Service]
ExecStart=/usr/local/bin/hhvm --config /etc/hhvm/server.hdf --user nobody --mode daemon -vServer.Type=fastcgi -vServer.Port=9000
[Install]
WantedBy=multi-user.target

Reload the systemd service, start hhvm and add it to be started at boot time:

systemctl enable hhvm
systemctl start hhvm
systemctl status hhvm

Congratulation’s! You have successfully installed HipHop Virtual Machine. Thanks for using this tutorial for installing HipHop Virtual Machine (HHVM) on CentOS 7 systems. For additional help or useful information, we recommend you to check the official HHVM web site.

How To Install Rancher on CentOS 7

Rancher on CentOS 7

The rancher is an open source program which helps you to run the containers in production. The rancher is based on Docker, which means it’s possible to run it on a dedicated box, KVM machine or perhaps on a LXC container. Rancher provides a huge library of applications which are installed in a few clicks and also supports docker pictures from Dockerhub.

Table of Contents

Step 1. First let’s start by ensuring your system is up-to-date.

Step 2. Installing Docker.

Step 3. Installing Rancher.

Step 4. Configure Firewall for Rancher.

Step 5. Accessing Rancher.

Prerequisites

This article assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘sudo’ to the commands to get root privileges. I will show you through the step by step installation the Rancher private container service on a CentOS 7 server.
Install Rancher on CentOS 7

Step 1. First let’s start by ensuring your system is up-to-date.

yum clean all
yum -y install epel-release
yum -y update

Step 2. Installing Docker.

Before we install the Rancher server, we have to install the docker machine. If you do not have docker installed, you can follow our guide here.

Step 3. Installing Rancher.

On the Linux machine with Docker installed, the command to start a single instance of Rancher is simple:

docker run -d --restart=unless-stopped -p 8080:8080 rancher/server:stable

Step 4. Configure Firewall for Rancher.

Rancher server uses port 8080 for the web interface. Configure the firewall to allow port 8080 and reload it:

firewall-cmd --zone=public --add-port=8080/tcp --permanent
firewall-cmd --reload

Step 5. Accessing Rancher.

Rancher will be available on HTTP port 8080 by default. Open your favorite browser and navigate to http://yourdomain.com:8080 or http://server-ip:8080 and complete the required the steps to finish the installation.

*Rancher doesn’t configure access control by default, so it is important to set this up immediately, otherwise the UI and API can be accessed by anyone who has your IP.

Congratulation’s! You have successfully installed Rancher. Thanks for using this tutorial for installing Rancher private container service on CentOS 7 systems. For additional help or useful information, we recommend you to check the official Rancher web site.

How To Install LiteCart on CentOS 7

LiteCart on CentOS 7

LiteCart is a free e-commerce, feature rich e-commerce solution. The framework is constructed to be lightweight and easy for developers to modify and build upon. LiteCart relies on the latest HyperText standard HTML 5, the latest CSS 3 for styling, the amazing jQuery framework for client-side dynamics, and the popular web scripting language PHP for server-side dynamics.

Table of Contents

Step 1. First let’s start by ensuring your system is up-to-date.

Step 2. Install LAMP server.

Step 3. Installing LiteCart.

Step 4. Configuring MariaDB for LiteCart.

Step 5. Configure Apache web server for LiteCart.

Step 6. Accessing LiteCart e-commerce.

 

 

Prerequisites

This article assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root accge of Linount, if not you may need to add ‘sudo’ to the commands to get root privileges. I will show you through the step by step installation LiteCart e-commerce on a CentOS 7 server.
Install LiteCart on CentOS 7

Step 1. First let’s start by ensuring your system is up-to-date.

yum clean all
yum -y update

Step 2. Install LAMP server.

A CentOS 7 LAMP stack server is required. If you do not have LAMP installed, you can follow our guide here. Also install required PHP modules:

yum -y install php-gd php-imap php-ldap php-odbc php-pear php-xml php-xmlrpc php-mbstring php-mcrypt php-mssql php-snmp php-soap php-tidy curl curl-devel

Step 3. Installing LiteCart.

First thing to do is to go to LiteCart’s download page and download the latest stable version of LiteCart, At the moment of writing this article it is version 2.0.2:

unzip litecart-2.0.2.zip -d litecart

We will need to change some folders permissions:

chown -R chown apache:apache -R litecart/

Step 4. Configuring MariaDB for LiteCart.

By default, MariaDB is not hardened. You can secure MariaDB using the mysql_secure_installation script. you should read and below each steps carefully which will set root password, remove anonymous users, disallow remote root login, and remove the test database and access to secure MariaDB:

mysql_secure_installation

Configure it like this:

- Set root password? [Y/n] y
- Remove anonymous users? [Y/n] y
- Disallow root login remotely? [Y/n] y
- Remove test database and access to it? [Y/n] y
- Reload privilege tables now? [Y/n] y

Next we will need to log in to the MariaDB console and create a database for the LiteCart. Run the following command:

mysql -u root -p

This will prompt you for a password, so enter your MariaDB root password and hit Enter. Once you are logged in to your database server you need to create a database for LiteCart installation:

MariaDB [(none)]> CREATE DATABASE lite DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci;
MariaDB [(none)]> GRANT ALL PRIVILEGES ON lite.* TO 'liteuser'@'localhost' IDENTIFIED BY 'strong_password';
MariaDB [(none)]> FLUSH PRIVILEGES;
MariaDB [(none)]> \q

Step 5. Configure Apache web server for LiteCart.

We will create Apache virtual host for your LiteCart website. First create ‘/etc/httpd/conf.d/vhosts.conf’ file with using a text editor of your choice:

nano /etc/httpd/conf.d/vhosts.conf
IncludeOptional vhosts.d/*.conf

Next, create the virtual host:

mkdir /etc/httpd/vhosts.d/
nano /etc/httpd/vhosts.d/yourdomain.com.conf

Add the following lines:

ServerAdmin [email protected]
DocumentRoot "/var/www/html/litecart/"
ServerName yourdomain.com
ServerAlias www.yourdomain.com
ErrorLog "/var/log/httpd/yourdomain.com-error_log"
CustomLog "/var/log/httpd/yourdomain.com-access_log" combined

<Directory "/var/www/html/litecart/">
DirectoryIndex index.html index.php
Options FollowSymLinks
AllowOverride All
Require all granted


Save and close the file. Restart the apache service for the changes to take effects:

systemctl restart httpd.service

Step 6. Accessing LiteCart e-commerce.

LiteCart e-commerce will be available on HTTP port 80 by default. Open your favorite browser and navigate to http://yourdomain.com/ or http://server-ip and complete the required the steps to finish the installation. If you are using a firewall, please open port 80 to enable access to the control panel.

Congratulation’s! You have successfully installed LiteCart. Thanks for using this tutorial for installing LiteCart e-commerce on CentOS 7 systems. For additional help or useful information, we recommend you to check the official LiteCart web site.

How To Install Redmine on CentOS 7

Redmine on CentOS 7

Redmine is a project management web app that allows users to manage projects flexibly while offering robust monitoring tools and a broad library of plug-ins. This free and open source solution offers a substitute for paid job management tools and contains support for wikis, forums, calendars, and information visualization programs.

Table of Contents

Step 1. First let’s start by ensuring your system is up-to-date.

Step 2. Installing all dependencies.

Step 3. Installing Ruby and RVM.

Step 4. Installing MySQL server.

Step 5. Installing Passenger and Nginx.

Step 6. Installing Redmine.

Step 7. Accessing Redmine.

Prerequisites

This article assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘sudo’ to the commands to get root privileges. I will show you through the step by step installation the Redmine project management web app on a CentOS 7 server.
Install Redmine on CentOS 7

Step 1. First let’s start by ensuring your system is up-to-date.

yum clean all
yum -y install epel-release
yum -y update

Step 2. Installing all dependencies.

Install all dependencies that are required by Redmine:

yum install zlib-devel curl-devel openssl-devel httpd-devel apr-devel apr-util-devel mysql-devel ftp wget ImageMagick-devel gcc-c++ patch readline readline-devel zlib libyaml-devel libffi-devel make bzip2 autoconf automake libtool bison iconv-devel subversion

Step 3. Installing Ruby and RVM.

Redmin requires Ruby. So, first you’ll want to install Ruby Version Manager which allows managing of multiple ruby environments:

gpg2 --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
curl -L https://get.rvm.io | bash -s stable --ruby=2.2.5

Now we have to add it the .bashrc file so it can be automatically reload and to add it to the .bashrc file run this:

echo '[[ -s "/usr/local/rvm/scripts/rvm" ]] && source "/usr/local/rvm/scripts/rvm"' >> ~/.bashrc

Reload the .bashrc file using this command:

source ~/.bashrc

Now run following command as shown below to check Ruby and RVM version:

ruby -v
rvm -v

Step 4. Installing MySQL server.

MySQL needs to be configured so that Redmine can store data, so we will install MySQL server:

rpm -Uvh https://dev.mysql.com/get/mysql57-community-release-el7-9.noarch.rpm
yum repolist
yum install mysql-server

Now start the mysqld service using systemctl command as shown below:

systemctl start mysqld

By default, MySQL is not hardened. You can secure MySQL using the mysql_secure_installation script. You should read and below each steps carefully which will set root password, remove anonymous users, disallow remote root login, and remove the test database and access to secure MySQL.

mysql_secure_installation

Configure it like this:

- Set root password? [Y/n] y
- Remove anonymous users? [Y/n] y
- Disallow root login remotely? [Y/n] y
- Remove test database and access to it? [Y/n] y
- Reload privilege tables now? [Y/n] y

Next we will need to log in to the MySQL console and create a database for the Redmine. Run the following command:

mysql -u root -p

This will prompt you for a password, so enter your MySQL root password and hit Enter. Once you are logged in to your database server you need to create a database for Redmine installation:

CREATE DATABASE redmin
GRANT ALL PRIVILEGES ON redmine.* TO 'redmine'@'localhost' IDENTIFIED BY 'PASSWORD';
FLUSH PRIVILEGES;
\q

Step 5. Installing Passenger and Nginx.

Passenger is an application server that runs your web application then communicates with the web server. We will install it and integrate it with Nginx:

gem install passenger --no-ri --no-rdoc
passenger-install-nginx-module

You will be asked for some information, and then it will install Nginx. The default installation directory is /opt/nginx. Of course, you can change it. In it, edit conf/nginx.conf.

On line 23, paste the following content:

include vhost/*.conf;

Save and close the file. Next, create a vhost directory for Virtual Host configuration files:

mkdir -p /opt/nginx/conf/vhost

ost

In this directory, create a redmine.conf file. The paste the following into that file:

server {
 listen 80;
 server_name yourdomain.com;

root /var/www/html/redmine/public;
 passenger_enabled on;
 client_max_body_size 10m; # Max attachemnt size

# redirect server error pages to the static page /50x.html
 #
 error_page 500 502 503 504 /50x.html;
 location = /50x.html {
 root html;
 }
 }

Restart the web server for the changes to take effect:

systemctl restart nginx
systemctl enable nginx

Step 6. Installing Redmine.

First, download the latest version of Redmine, at the moment of writing this article it is version 3.4:

cd /var/www/
svn co http://svn.redmine.org/redmine/branches/3.4-stable redmine

Next, change the current working directory and the example configuration files:

cd redmine
cp config/configuration.yml.example config/configuration.yml
cp config/database.yml.example config/database.yml

Make the following changes to the database.yml file:

nano config/database.yml

Add following content:

production:
 adapter: mysql2
 database: redmine
 host: localhost
 username: redmine
 password: PASSWORD
 encoding: utf8

Run following commands to change the owner to user and group nobody:

mkdir -p tmp tmp/pdf public/plugin_assetssud
chown -R nobody:nobody files log tmp public/plugin_assetssudo
chmod -R 775 files log tmp public/plugin_assets

Install the bundler and gem dependencies for redmine:

gem install bundlerbundle install --without development test

Generate the secret token using the following command:

bundle exec rake generate_secret_token
RAILS_ENV=production bundle exec rake db:migrate
RAILS_ENV=production bundle exec rake redmine:load_default_data

Finally, Restart the web server for the changes to take effect:

systemctl restart nginx

Step 7. Accessing Redmine.

Redmine will be available on HTTP port 80 by default. Open your favorite browser and navigate to http://mydomain.com and complete the required the steps to finish the installation using the default credentials (admin/admin). If you are using a firewall, please open port 80 to enable access to the control panel.

Congratulation’s! You have successfully installed Redmine. Thanks for using this tutorial for installing Redmine project management web app on CentOS 7 systems. For additional help or useful information, we recommend you to check the official Redmine web site.

How To Set up WebDAV using Apache on CentOS 7

WebDAV using Apache on CentOS 7

WebDAV (Web-based Distributed Authoring and Versioning) is an Extension of the HTTP protocol that allows users to edit and manage files and documents stored on servers.

WebDAV provides a frame for users to create, alter, move, Upload, and download documents on an Apache web server. This makes WebDAV a favorite choice for programmers, especially when combined with Subversion or Git.

Table of Contents

Step 1. First let’s start by ensuring your system is up-to-date.

Step 2. Installing Apache web server.

Step 3. Configure WebDAV.

Step 4. Configure Apache vhost for WebDAV.

Step 5. Accessing WebDAV.

 

Prerequisites

This article assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘sudo’ to the commands to get root privileges. I will show you through the step by step set up WebDAV using Apache on CentOS 7 server.
Set up WebDAV using Apache on CentOS 7

Step 1. First let’s start by ensuring your system is up-to-date.

yum clean all
yum -y install epel-release
yum -y update

Step 2. Installing Apache web server.

Install Apache using YUM:

yum install httpd

Start the Apache web server:

systemctl start httpd.service
systemctl enable httpd.service

For Apache, there are three WebDAV-related modules which will be loaded by default when a Apache web server getting started. You can confirm that with this command:

httpd -M | grep dav

You should be result with:

dav_module (shared)
dav_fs_module (shared)
dav_lock_module (shared)

Step 3. Configure WebDAV.

After installing the WebDAV module, you will need to create a webdav directory:

mkdir /var/www/html/webdav
chown -R apache:apache /var/www/html
chmod -R 755 /var/www/html

Set up password authentication:

htpasswd -c /etc/httpd/.htpasswd chedelics

Now, you need to assign group ownership of the file to the apache user, and lock down the permissions for everyone else. To do this, run the following command:

chown root:apache /etc/httpd/.htpasswd
chmod 640 /etc/httpd/.htpasswd

Step 4. Configure Apache vhost for WebDAV.

Next, you need to create a virtual host file for the webdav directory:

nano /etc/httpd/conf.d/webdav.conf

Add the following content:

DavLockDB /var/www/html/DavLock

 ServerAdmin webmaster@localhost
 DocumentRoot /var/www/html/webdav/
 ErrorLog /var/log/httpd/error.log
 CustomLog /var/log/httpd/access.log combined
 Alias /webdav /var/www/html/webdav
 
 DAV On
 AuthType Basic
 AuthName "webdav"
 AuthUserFile /etc/httpd/.htpasswd
 Require valid-user
 

Save and exit, Restart Apache to put your changes into effect:

systemctl restart httpd.service

Step 5. Accessing WebDAV.

WebDAV will be available on HTTP port 80 by default. Open your favorite browser and navigate to http://mydomain.com/webdav and complete the required the steps to finish the installation. If you are using a firewall, please open port 80 to enable access to the control panel.

Congratulation’s! You have successfully installed WebDAV using Apache on CentOS 7. Thanks for using this tutorial for set up WebDAV using Apache on CentOS 7 systems. For additional help or useful information, we recommend you to check the official WebDAV web site.