LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-17-2009, 07:06 AM   #1
nayaksuraj
LQ Newbie
 
Registered: Jul 2009
Posts: 2

Rep: Reputation: 0
How to start more than 1 virtual server on any Linux distro?


hi,

I am newbie in Linux world. I have fedora 9. I have installed one virtual server and have default www directory. So when I start my virtual server(/www/bin/apachectl start), it start perfectly, on the same when i am going start my default server which is located at /var/www it won't start. I have to stop my previous virtual server and then I can start my default one.

So question is 1. In one pc we only start one virtual server or we can run several virtual servers on one pc at the same time ?

Please help...

Regards,

Suraj Nayak
 
Old 09-17-2009, 07:19 AM   #2
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Nagpur, India
Distribution: Cent OS 5/6, Ubuntu Server 10.04
Posts: 4,629

Rep: Reputation: Disabled
Quote:
Originally Posted by nayaksuraj View Post
hi,

I am newbie in Linux world. I have fedora 9. I have installed one virtual server and have default www directory. So when I start my virtual server(/www/bin/apachectl start), it start perfectly, on the same when i am going start my default server which is located at /var/www it won't start. I have to stop my previous virtual server and then I can start my default one.

So question is 1. In one pc we only start one virtual server or we can run several virtual servers on one pc at the same time ?

Please help...

Regards,

Suraj Nayak
Sorry. This is not the place to ask the question. This thread was started by jeremy for specific purpose.
Start your own thread for your issue in a relevant forum.
 
Old 09-17-2009, 10:32 AM   #3
jeremy
root
 
Registered: Jun 2000
Distribution: Debian, Red Hat, Slackware, Fedora, Ubuntu
Posts: 11,957

Rep: Reputation: 3113Reputation: 3113Reputation: 3113Reputation: 3113Reputation: 3113Reputation: 3113Reputation: 3113Reputation: 3113Reputation: 3113Reputation: 3113Reputation: 3113
// moved.

--jeremy
 
Old 09-17-2009, 11:48 AM   #4
Wim Sturkenboom
Senior Member
 
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Slackware 10.1/10.2/12, Ubuntu 12.04, Crunchbang Statler
Posts: 3,786

Rep: Reputation: 282Reputation: 282Reputation: 282
Yes, that can be done using virtual hosts. And you will only have one 'instance' of apache running.

From my apache webserver
Code:
#
# Use name-based virtual hosting.
#
NameVirtualHost *:80

# catch-all
<VirtualHost *:80>
    ServerAdmin me@mydomain
    DocumentRoot /srv/httpd/htdocs
    ServerName btd-techweb02
</VirtualHost>

# site 1
<VirtualHost *:80>
    ServerAdmin me@mydomain
    DocumentRoot /home/wim/www/site1/web
    ServerName site1.btd-techweb02
    ErrorLog /var/log/httpd/error_log
    CustomLog /var/log/httpd/access_log common

#WimS
# this is required to prevent message 403 "Forbidden"
    <Directory "/home/wim/www/site1/web">
        Order allow,deny
        Allow from all
    </Directory>
</VirtualHost>

# site2
<VirtualHost *:80>
    ServerAdmin me@mydomain
    DocumentRoot /home/wim/www/site2/web
    ServerName site2.btd-techweb02
    ErrorLog /var/log/httpd/error_log
    CustomLog /var/log/httpd/access_log common

#WimS
# this is required to prevent message 403 "Forbidden"
    <Directory "/home/wim/www/site2/web">
        Order allow,deny
        Allow from all
    </Directory>
</VirtualHost>
Where you place this in Fedora, I don't know as I don't use Fedora. In Slackware it's in a separate file that is included in httpd.conf. You can also dump it in httpd.conf.

PS Ubuntu is definitely different
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Running linux(CentOS) as virtual server on Windows 2003 server? manoj.maniraj Linux - Server 3 03-26-2009 05:08 AM
Linux Distro for Virtual Server/Workstation Host nixuzer Linux - Distributions 1 09-05-2008 07:52 PM
Why does linux start 6 virtual consoles/terminals? pantherlehr Linux - General 3 07-17-2008 01:25 AM
VMWare Server + Which Start Distro tompickles Linux From Scratch 4 06-11-2007 08:38 AM


All times are GMT -5. The time now is 06:23 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration