• Categories
    Category
  • Categories
    Category
  • News
  • Tutorials
  • Forums
  • Tags
  • Users
Tutorial Comments FAQ Related Articles

How to configure Apache Virtual Host in OpenSUSE

929

To configure Apache Virtual Host in OpenSUSE 13.2

Virtual Hosting is a method to host more than one domain on a web server. Virtual Hosting is of two types - Name based and IP based. While multiple sites can be run on the same IP address with Name based Virtual Hosting, the IP based virtual hosting can have different IP addresses for each site. This article simplifies the configuration procedure of Apache Virtual Host in OpenSUSE 13.2


To Install Apache

First step is to install Apache by deploying the Zypper command.

linuxhelp:/home/user1 # zypper install apache2
Retrieving repository ' openSUSE-13.2-Non-Oss'  metadata ...................[done]
Building repository ' openSUSE-13.2-Non-Oss'  cache ........................[done]
Retrieving repository ' openSUSE-13.2-Oss'  metadata .......................[done]
Building repository ' openSUSE-13.2-Oss'  cache ............................[done]
Retrieving repository ' openSUSE-13.2-Update'  metadata ....................[done]
.
.
.
(6/6) Installing: apache2-prefork-2.4.10-31.1 ............................[done]

Once the installation of Apache is complete, start the Apache service with the help of following command.

linuxhelp:/home/user1 # systemctl start apache2

Once it is done, enable the apache service with the following command.

linuxhelp:/home/user1 # systemctl enable apache2

You can verfity the status of apache service with the below mentioned command.

linuxhelp:/home/user1 # systemctl status apache2


To Configure Apache Virtual Host

Once you have installed and checked the status of Apache, go to its Web-root directory and create a new directory as mentioned below.

linuxhelp:/home/user1 # cd /srv/www/htdocs/
linuxhelp:/srv/www/htdocs # mkdir site1

Create a new file in the above mentioned directory by using the following command.

linuxhelp:/srv/www/htdocs # vim index.html

Enter some text in the newly created file.
Apache-Virtual-Host-new-file

Create a new virtualhost configuration file in the below mentioned directory and configure it as follows.

linuxhelp:/home/user1 # vim /etc/apache2/conf.d/vhost.conf

DocumentRoot " /srv/www/htdocs/site1" 
ServerName      www.linuxhelp1.com

Once you are done with the configuration, open the host file and enter Virtualhost domain name with your server-ip.

linuxhelp:/home/user1 # vim /etc/hosts
192.168.5.170 www.linuxhelp1.com


To restart the Apache server

Give effect to the virtual host you have just created by restarting the Apache server with the help of the following command.

linuxhelp:~ # systemctl restart apache2.service


To check Apache Virtual Host

Enter the newly created domain on your web browser to check the Virtual Host. The browser will display the site you have created.
Apache-Virtual-Host-domain

To create multiple domains using Virtual Host, create another new directory in Apache' s document root directory and repeat the previous steps. Now open the browser and call the newly created domain name to verify its functioning.

Apache-Virtual-Host-multiple-domains

Tags:
henry
Author: 

Comments ( 0 )

No comments available

Add a comment

Frequently asked questions ( 5 )

Q

What kind of process to have in the apache virtual host?

A

Virtual Hosting is a method to host more than one domain on a web server. Virtual Hosting is of two types - Name based and IP based.  While multiple sites can be run on the same IP address wi

Q

How Can I install cPanel on my VPS package?

A

CPanel is pre-installed with all our VPS Hosting plans, so you don’t have to worry about the purchase or installation of your control panel.

Q

Does the Dedicated IP available with VPS hosting plans?

A

You get 1 free default Dedicated IP with every VPS Hosting Plan. And an additional addon IP with Snappy 4000, Snappy 6000 & Snappy 8000. For additional IPs, kindly get in touch with the suppo

Q

How can I Upgrade/Downgrade my plan?

A

At the moment, you can upgrade/downgrade VPS India plans only.

Q

What are the advantages of VPS Hosting in apache?

A

With HostGator’s VPS Hosting, your website and applications remain unaffected by the activities carried out by another user on the same server. Full root access helps you install any custom s

Related Tutorials in How to configure Apache Virtual Host in OpenSUSE

Related Tutorials in How to configure Apache Virtual Host in OpenSUSE

How to install Apache from Source Code on CentOS 7
How to install Apache from Source Code on CentOS 7
Oct 21, 2017
How to Completely Remove and Install Apache package on CentOS 7.6
How to Completely Remove and Install Apache package on CentOS 7.6
May 23, 2019
How to install apache jmeter on ubuntu 18.04
How to install apache jmeter on ubuntu 18.04
May 19, 2018
How to Install Pligg - Content Management System
How to Install Pligg - Content Management System
Jul 26, 2016
How to Configure HAproxy Load Balancer with Keepalived in CentOS
How to Configure HAproxy Load Balancer with Keepalived in CentOS
Nov 21, 2016
How to enable the Apache server-status on centos 7
How to enable the Apache server-status on centos 7
Jan 28, 2019
How to Create Ansible Playbook to Install Apache Server
How to Create Ansible Playbook to Install Apache Server
May 12, 2021
How to Install and update openssl on opensuse15.1
How to Install and update openssl on opensuse15.1
Nov 15, 2019

Related Forums in How to configure Apache Virtual Host in OpenSUSE

Related Forums in How to configure Apache Virtual Host in OpenSUSE

CentOS
connor class=
How To Completely Remove Apache package On CentOS 7.6
May 14, 2019
Ubuntu
matthew class=
Failed to enable unit: Refusing to operate on linked unit file sshd.service
Apr 15, 2019
Zypper
philippe class=
PackageKit is blocking zypper.
Sep 11, 2018
Apache
isaac class=
How to disable apache welcome page on Ubuntu
Dec 15, 2018
Pligg
aiden class=
CMS : Pligg install on opensuse
Oct 6, 2017
Apache
rebeccajazz class=
Apache2 : mod_proxy in opensuse
Jan 3, 2018
OpenSUSE
dalogui class=
Ayuda urgente instale SSL para servidor Opensuse y ahora no funciona tengo servicio web
Jul 15, 2019
Apache
elijah class=
What is the difference between httpd and apache
Feb 18, 2017

Related News in How to configure Apache Virtual Host in OpenSUSE

Related News in How to configure Apache Virtual Host in OpenSUSE

openSUSE Leap 42.3 Officially Released
openSUSE Leap 42.3 Officially Released
Jul 27, 2017
Attackers take advantage of Apache Struts vulnerabilities
Attackers take advantage of Apache Struts vulnerabilities
Mar 17, 2017
An Apache Web Server Bug That Grants Root Access on  Shared Web Hosts
An Apache Web Server Bug That Grants Root Access on Shared Web Hosts
Apr 10, 2019
Tyson Foods Honored as SUSE Customer of the Year
Tyson Foods Honored as SUSE Customer of the Year
Feb 11, 2017
SUSE Soon To Be Largest Independent Linux Vendor
SUSE Soon To Be Largest Independent Linux Vendor
Apr 14, 2019
Back To Top!
Rank
User
Points

Top Contributers

userNamenaveelansari
135850

Top Contributers

userNameayanbhatti
92510

Top Contributers

userNamehamzaahmed
32150

Top Contributers

1
userNamelinuxhelp
31040

Top Contributers

userNamemuhammadali
24500
Can you help David Lopez Guillen ?
Ayuda urgente instale SSL para servidor Opensuse y ahora no funciona tengo servicio web

hola segui este tutorial para tener un certificado ssl y ahora no se ve mi app en la red, espero alguien pueda ayudarme, tengo M9oodle en3.5 en un servidor open suse y ahora no funciona por favor ayuda.

https://www.linuxhelp.com/how-to-create-ssl-certificate-in-opensuse

Networking
  • Routing
  • trunk
  • Netmask
  • Packet Capture
  • domain
  • HTTP Proxy
Server Setup
  • NFS
  • KVM
  • Memory
  • Sendmail
  • WebDAV
  • LXC
Shell Commands
  • Cloud commander
  • Command line archive tools
  • last command
  • Shell
  • terminal
  • Throttle
Desktop Application
  • Linux app
  • Pithos
  • Retrospect
  • Scribe
  • TortoiseHg
  • 4Images
Monitoring Tool
  • Monit
  • Apache Server Monitoring
  • EtherApe 
  • Arpwatch Tool
  • Auditd
  • Barman
Web Application
  • Nutch
  • Amazon VPC
  • FarmWarDeployer
  • Rukovoditel
  • Mirror site
  • Chef
Contact Us | Terms of Use| Privacy Policy| Disclaimer
© 2025 LinuxHelp.com All rights reserved. Linux™ is the registered trademark of Linus Torvalds. This site is not affiliated with linus torvalds in any way.