Knowledgebase

2 apache daemons

Posted by linktome, 08-30-2007, 10:02 PM
I am reading a topic that saying we can compile 2 apache daemons on the same server, one serves for static files, one serves for dynamic contents. But there is no where I can find out how to do. Is there anyone here can help? tks,

Posted by anatolijd, 08-30-2007, 11:27 PM
yes, you can run two apache daemons on the same server. apache compiling process is well described on httpd.apache.org, as well as on Google . Two key moments to put your attention: - they must be installed into different directories on server. - they must be configured to listen to different ports (say 1st one to 80 port, 2nd one to 8080 port). On my CentOS server, i installed one from centos repository using yum, second apache was compiled. What that topic says about the goal of running two apache instances on the single server for different types of content ???

Posted by hbhb, 08-30-2007, 11:42 PM
mind to share what are the benefits?

Posted by ximi, 08-30-2007, 11:56 PM
The dynamic server doesn't get bogged down by fetching static files such as images which can slow down the server under a load. There are light weight web servers that are "optimized" to serve static content well. The benefit is more efficient use of resources however I haven't been convinced if that's the case when both servers are running on the same machine.

Posted by kencox, 08-31-2007, 12:10 AM
They could both be configured to listen on port 80 if each instance had its own ip. eth0:80 for apache1 eth1:80 for apache2

Posted by StevenG, 08-31-2007, 02:36 AM
You can run 2 apache servers on 1 interface, using different IP addresses, both using port 80 or whatever. Listen xxx.xxx.xxx.xxx:80 Is what you need in each apache servers conf file, to bind the server to only that IP. Last edited by StevenG; 08-31-2007 at 02:41 AM.

Posted by Cristi4n, 08-31-2007, 03:43 AM
You can also run just one apache server twice. You will need 2 ip's but you will not need to compile 2 apache servers, you will use the one you have installed. Of course, you can set one to load php and other extensions and the second apache to not load anything. This is pro cPanel in my opinion as you will use the same configuration file. I did this in order to have mod_php4 and mod_php5 on the same server with cPanel.

Posted by david510, 08-31-2007, 04:40 AM
You may install lighthttpd as a second webserver and use that to server static pages such as images, docs etc. It will be more efficient.

Posted by Cristi4n, 08-31-2007, 04:44 AM
Do you use any control panel ?

Posted by david510, 08-31-2007, 05:03 AM
From his signature, I think he has DA control panel

Posted by Cristi4n, 08-31-2007, 05:05 AM
I thought that too but you can never know

Posted by kgs_namboothiri, 08-31-2007, 01:59 PM
COLOR=Red]yes You can run 2 apapche in same server.But You should Specify the port in .cnf file.Eg.If you have default appache then also if you want you can install LAMP which have apache. <> Last edited by anon-e-mouse; 08-31-2007 at 05:31 PM.

Posted by Cristi4n, 08-31-2007, 02:42 PM
we are talking about linux right ?

Posted by kgs_namboothiri, 08-31-2007, 03:38 PM
Yes through linux (shell Command )I am talking.



Was this answer helpful?

Add to Favourites Add to Favourites

Print this Article Print this Article

Also Read
MySQL Issue (Views: 612)
u2mike 1 month review (Views: 580)


Language:

Client Login

Email

Password

Remember Me

Search