LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
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, 06: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, 06:19 AM   #2
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Gurgaon, India
Distribution: Cent OS 6/7
Posts: 4,631

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, 09:32 AM   #3
jeremy
root
 
Registered: Jun 2000
Distribution: Debian, Red Hat, Slackware, Fedora, Ubuntu
Posts: 13,600

Rep: Reputation: 4083Reputation: 4083Reputation: 4083Reputation: 4083Reputation: 4083Reputation: 4083Reputation: 4083Reputation: 4083Reputation: 4083Reputation: 4083Reputation: 4083
// moved.

--jeremy
 
Old 09-17-2009, 10:48 AM   #4
Wim Sturkenboom
Senior Member
 
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Ubuntu 12.04, Antix19.3
Posts: 3,794

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



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 04:08 AM
Linux Distro for Virtual Server/Workstation Host nixuzer Linux - Distributions 1 09-05-2008 06:52 PM
Why does linux start 6 virtual consoles/terminals? pantherlehr Linux - General 3 07-17-2008 12:25 AM
VMWare Server + Which Start Distro tompickles Linux From Scratch 4 06-11-2007 07:38 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:01 PM.

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
Open Source Consulting | Domain Registration