• Categories
    Category
    {{ postCtrl.tags }}
    • {{ category.tag_type }}

      • {{tag.tag_name}}
      • View more
  • Categories
    Category
    {{ postCtrl.tags }}
    • {{ category.tag_type }}

      • {{tag.tag_name}}
      • View more
  • News
  • Tutorials
  • Forums
  • Tags
  • Users
Tutorial News Comments FAQ Related Articles

How to configure Apache Virtual Host in OpenSUSE

{{postValue.id}}

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
{{postCtrl.cmtErrMsg}}

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

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 Luke ?
workbench for debian

I am using workbench in CentOS whereas now I need to use Debian Operating system so could you please help to install and use in Debian?

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.