LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 04-21-2010, 12:15 AM   #1
sandeepthug
Member
 
Registered: Nov 2008
Posts: 38

Rep: Reputation: 15
Multiple httpd daemons


Hi,


I need to run multiple httpd daemon. I have multiple ip's assigned on one interface and i want to run multiple websites on these ip's,

And i need to run multiple apache daemons for this. How can i do that

Thanks
Sandeep
 
Old 04-21-2010, 12:21 AM   #2
paulsm4
LQ Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
When you specify a virtual server (e.g. in your httpd.conf), you can specify a specific IP associated with that particular "http server".

If you're using Apache2, you've probably already got multiple http daemons: the actual work done by the server will be allocated most efficiently among the daemons.
 
Old 04-21-2010, 12:24 AM   #3
Sayan Acharjee
Member
 
Registered: Feb 2010
Location: Chennai, India
Distribution: Manjaro
Posts: 624

Rep: Reputation: 64
Quote:
Originally Posted by sandeepthug View Post
Hi,


I need to run multiple httpd daemon. I have multiple ip's assigned on one interface and i want to run multiple websites on these ip's,

And i need to run multiple apache daemons for this. How can i do that

Thanks
Sandeep
You mean you have virtual ip's assigned to your interface, right? If so, then you don't need multiple httpd daemons.
In my apache server i have 14 virtual ip's from 192.168.1.81-95 and I'm hosting 14 sites with them.

Last edited by Sayan Acharjee; 04-21-2010 at 12:25 AM.
 
Old 04-21-2010, 12:32 AM   #4
sandeepthug
Member
 
Registered: Nov 2008
Posts: 38

Original Poster
Rep: Reputation: 15
Hi

thanks for the reply
can you please provide little more detail on this. Precisely, I want
to run multiple httpd based on the httpd.conf supplied as start
parameter.

Create a set of init scripts based on the one supplied by redhat, and
modify the invocation of apachectl or httpd within the script to pass
different -f parameters.


Sandeep
 
Old 04-21-2010, 12:37 AM   #5
Sayan Acharjee
Member
 
Registered: Feb 2010
Location: Chennai, India
Distribution: Manjaro
Posts: 624

Rep: Reputation: 64
Quote:
Originally Posted by sandeepthug View Post
Hi

thanks for the reply
can you please provide little more detail on this. Precisely, I want
to run multiple httpd based on the httpd.conf supplied as start
parameter.

Create a set of init scripts based on the one supplied by redhat, and
modify the invocation of apachectl or httpd within the script to pass
different -f parameters.


Sandeep

Create some virtual ip's, edit the httpd.conf file with these virtual ip's and their respective document root (assuming you know how to configure apache).
Restart apache and you are done.
 
Old 04-21-2010, 12:48 AM   #6
paulsm4
LQ Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
Sounds like a homework assignment
 
Old 04-21-2010, 01:01 AM   #7
sandeepthug
Member
 
Registered: Nov 2008
Posts: 38

Original Poster
Rep: Reputation: 15
okay, then how will these websites run under different users, groups and permissions
because that's why we want to use ip based hosting on multiple daemons for extra security.
 
Old 04-21-2010, 01:06 AM   #8
Sayan Acharjee
Member
 
Registered: Feb 2010
Location: Chennai, India
Distribution: Manjaro
Posts: 624

Rep: Reputation: 64
Quote:
Originally Posted by sandeepthug View Post
okay, then how will these websites run under different users, groups and permissions
because that's why we want to use ip based hosting on multiple daemons for extra security.
Not sure what you meant by saying running a website under different users, groups ans permissions.
You can apply https if you want one particular site to be accessed by one particular user.
 
Old 04-21-2010, 02:29 AM   #9
sandeepthug
Member
 
Registered: Nov 2008
Posts: 38

Original Poster
Rep: Reputation: 15
If separate httpd daemons must be run for each host, separate
installations of Apache for each virtual host have to be created. For
each installation, use the Listen directive in the httpd.conf
configuration file to select which IP address or virtual host that
daemon services"

Do I need to have separate installation of apache or copying the conf
folder will do ?
 
Old 04-21-2010, 02:29 AM   #10
sandeepthug
Member
 
Registered: Nov 2008
Posts: 38

Original Poster
Rep: Reputation: 15
If separate httpd daemons must be run for each host, separate
installations of Apache for each virtual host have to be created. For
each installation, use the Listen directive in the httpd.conf
configuration file to select which IP address or virtual host that
daemon services"

Do I need to have separate installation of apache or copying the conf
folder will do ?
 
Old 04-21-2010, 04:02 AM   #11
sandeepthug
Member
 
Registered: Nov 2008
Posts: 38

Original Poster
Rep: Reputation: 15
I read that from apache site



Setting up multiple daemons

Create a separate httpd installation for each virtual host. For each installation, use the Listen directive in the configuration file to select which IP address (or virtual host) that daemon services. e.g.

Listen www.smallco.com:80

It is recommended that you use an IP address instead of a hostname (see DNS caveats).


do i need to create or copy the httpd.conf files ??

thanks
Sandeep
 
Old 04-21-2010, 06:48 AM   #12
nowonmai
Member
 
Registered: Jun 2003
Posts: 481

Rep: Reputation: 48
It is unclear what you are trying to achieve...

If you wish to run separate instances of Apache, you will need to create a separate config file and init script for each one. Also, each instance will have to listen on its own port.

Apache is designed to run as a single instance, spawning worker processes to handle requests. I am not sure what you think will be achieved by running many instances of the parent.

Quote:
Originally Posted by sayan_acharjee View Post
Not sure what you meant by saying running a website under different users, groups ans permissions.
You can apply https if you want one particular site to be accessed by one particular user.
I'm sure what you meant is .htaccess/.htpasswd, right?
HTTPS is just a protocol... it doesn't provide any authentication.

Quote:
Originally Posted by sandeepthug View Post
we want to use ip based hosting on multiple daemons for extra security.
If what you want to do is have multiple, completely segmented hosting platforms... such as a shared web host at an ISP, running a single Apache instance proxying multiple chrooted Apache instances, each listening on its own port, would seem like the right solution.

Can you clarify the purpose of your attempts, not just the attempts themselves?
 
  


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
Multiple SSH Daemons - FC11 mattcauthon Linux - Software 4 06-16-2010 08:22 AM
httpd error - multiple interface bindings (Apache) Nightblade_oz Linux - Software 2 09-24-2005 11:51 AM
multiple mysql daemons starting trint Slackware 1 02-08-2005 02:11 AM
Using UML or chroot for multiple daemons coindood Linux - Software 0 06-29-2004 03:14 PM
HTTPD running multiple processes jjustin01 Linux - Software 1 03-04-2004 07:16 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 01:22 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
Open Source Consulting | Domain Registration