?
Solved

Want to run each virtual server as uniqe peocess in Solaris

Posted on 2003-03-20
9
Medium Priority
?
280 Views
Last Modified: 2013-12-05
Hi,

I'm using Apache 1.3 in Solaris. I have configured a virtual server in Apache. I'm able to succesfully browse the default page & the virtual server. As you all know that, when you start the Apache server it will run a process with a process ID in Solaris. So, when i stop the default server, I'm also not able to access the Virtual Server, since the Apache is running with one process ID.

Here is my requirement. I need to create mutiple virtual servers and want to run every virtual server as a seperate process with seperate process ID. So when I stop one virtual server, the other virtual servers will work with out stopping. Please can any one help me in this? I have searched a lot & couldn't find any answer for this.

Thanks
Siva.
0
Comment
Question by:skumar123
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
  • 3
9 Comments
 
LVL 15

Expert Comment

by:samri
ID: 8178905
no you can't.

0
 

Author Comment

by:skumar123
ID: 8181190
Thanks for the responce. I would like to know one more thing. Is there any way to run multiple Apache servers in a single solaris server with uniqe process ID (not as virtaul server)?

0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 8184533
why should this not work? samri

simply create a httpd.conf for each of your virtual servers.
Then start apache with the apropriate conf file, ready.
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:skumar123
ID: 8184905
It sounds good. If it is possible, can you please tell me how to perform that? Any documents or tips? Please.

Thanks in advance.
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 8185785
make a copy of httpd.conf for each your virtual servers.
In each copy remove the other virtual servers, just leave the definitions for one in it.
Then start apache with each config file
    httpd -f /etc/httpd/vserv-1.conf
    httpd -f /etc/httpd/vserv-2.conf
    ...

in each *.conf make shure that the server does **not** bind
to all interfaces, but only exacly one.
You either need a own IP for each server, or each server needs to run on another port.
Virtual IPs on the NIC might be the simplest solution.
0
 
LVL 15

Expert Comment

by:samri
ID: 8186906
ahoffmann/smukar123,

apology on not elaborating the answer (lazy brat!).  I just assumed that apache alone cannot do that, unless, something is done at the OS layer.

and yes, you are correct on the explanation.  

Another approach (Not virtual IP approacah) would be running one apache, and let's called this the "master", to listen on port 80, and have have a separate apache for each Vhost that you want to run (just like ahoffmann proposed), but the apache for the Vhost will be listening on port other than 80. Let's pick 10001,10002, etc.

In the master config, create a Vhost container for each Vhost, and redirect request for each Vhost, to it's respective Apache (which is listeing on different port).  Mod_rewrite can be used, Redirect, or even ProxyPass/ProxyPassReverse could be used.

0
 

Author Comment

by:skumar123
ID: 8198842
Thanks ahoffmann,

It works. I have configured individual httpd.conf file for another server and started by using httpd -f /etc/apache/test/httpd.conf. Noe that server is running with a seperate process ID. If want to stop this specific instance, what should I do? Now i'm stopping this server by simply killing the process IDs. Since i can stop the default server by using the ./apachect1 stop command, is it possible to stop the other servers also like this?

Also I have another querry. After i start the server, when i type ps -ef and check the processes, I observed that the same server process is running with nearly six precesses. There is one parent process ID and rest of them are using that process ID as parent ID with unique child process IDs. I can't understand why more than one process is running for a server. Can you please clarrify me?

Thanks in
0
 
LVL 51

Accepted Solution

by:
ahoffmann earned 300 total points
ID: 8201946
>  ./apachect1 stop
never used this, I always use kill, or killproc

> .. server process is running with nearly six precesses.
see in your httpd.conf

   StartServers

think it has a value of 4 or 5 or 6 ;-)

0
 
LVL 15

Expert Comment

by:samri
ID: 8234070
it's 5 (again a guess).
0

Featured Post

Building an interactive eFuture classroom

Watch and learn how ATEN provided a total control system solution including seamless switching matrix switch, HDBaseT extenders, PDU, lighting control to build an interactive eFuture classroom.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Using libpcap/Jpcap to capture and send packets on Solaris version (10/11) Library used: 1.      Libpcap (http://www.tcpdump.org) Version 1.2 2.      Jpcap(http://netresearch.ics.uci.edu/kfujii/Jpcap/doc/index.html) Version 0.6 Prerequisite: 1.      GCC …
If you've heard about htaccess and it sounds like it does what you want, but you're not sure how it works... well, you're in the right place. Read on. Some Basics #1. It's a file and its filename is .htaccess (yes, with a dot in the front). #…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.
Suggested Courses

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question