LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices



Reply
 
Search this Thread
Old 12-07-2012, 10:56 AM   #1
rajaniyer123
Member
 
Registered: Feb 2004
Location: BARODA, GUJARAT
Posts: 259

Rep: Reputation: 30
How to install second instance of Apache in the same server


Hi,

In one of server I have already installed one apache from source version in /usr/local/apache2.

Now I would like to install 2nd second instance of apache2 as /usr/local/apache2_new.

I have copied the apache2 as apache2_new and done changes in path of apache2 to apache2_new in httpd.conf and changed the port to different port no.

now while starting it is giving me error

httpd (pid xxxxx) already running, while checking xxxx is the process id of /usr/local/apache2.

Please suggest is there anything need to configure to start second apache.

Thanks
Rajan
 
Old 12-07-2012, 11:21 AM   #2
eSelix
Senior Member
 
Registered: Oct 2009
Location: Wroclaw, Poland
Distribution: Arch, Kubuntu
Posts: 1,246

Rep: Reputation: 309Reputation: 309Reputation: 309Reputation: 309
You should change or set "PidFile" directive in configuration of second Apache.
 
Old 12-07-2012, 11:25 AM   #3
rajaniyer123
Member
 
Registered: Feb 2004
Location: BARODA, GUJARAT
Posts: 259

Original Poster
Rep: Reputation: 30
Hi,

any idea how to set that


Thanks
Rajan
 
Old 12-07-2012, 11:31 AM   #4
rajaniyer123
Member
 
Registered: Feb 2004
Location: BARODA, GUJARAT
Posts: 259

Original Poster
Rep: Reputation: 30
Hi,

Also which checking httpd -V from both the location it shows same parameter.

httpd -V

Server MPM: Prefork
threaded: no
forked: yes (variable process count)
Server compiled with....
-D APACHE_MPM_DIR="server/mpm/prefork"
-D APR_HAS_SENDFILE
-D APR_HAS_MMAP
-D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
-D APR_USE_FCNTL_SERIALIZE
-D APR_USE_PTHREAD_SERIALIZE
-D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
-D APR_HAS_OTHER_CHILD
-D AP_HAVE_RELIABLE_PIPED_LOGS
-D DYNAMIC_MODULE_LIMIT=128
-D HTTPD_ROOT="/usr/local/apache2"
-D SUEXEC_BIN="/usr/local/apache2/bin/suexec"
-D DEFAULT_PIDLOG="logs/httpd.pid"
-D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
-D DEFAULT_LOCKFILE="logs/accept.lock"
-D DEFAULT_ERRORLOG="logs/error_log"
-D AP_TYPES_CONFIG_FILE="conf/mime.types"
-D SERVER_CONFIG_FILE="conf/httpd.conf"

Please suggest.
 
Old 12-07-2012, 11:35 AM   #5
eSelix
Senior Member
 
Registered: Oct 2009
Location: Wroclaw, Poland
Distribution: Arch, Kubuntu
Posts: 1,246

Rep: Reputation: 309Reputation: 309Reputation: 309Reputation: 309
In "httpd.conf" file. For example:
Code:
PidFile "/var/run/apache2_new.pid"
By the way, if you use the same version of second Apache as the first, you no need to copy executable file to another location, just use the same, but point it to use another configuration file specfying option "-f /etc/apache2_new/new_config_file.conf".

Quote:
Also which checking httpd -V from both the location it shows same parameter.
You probably did not specified new configuration option, like I wrote ealier.

Last edited by eSelix; 12-07-2012 at 11:37 AM.
 
1 members found this post helpful.
Old 12-07-2012, 11:58 AM   #6
rajaniyer123
Member
 
Registered: Feb 2004
Location: BARODA, GUJARAT
Posts: 259

Original Poster
Rep: Reputation: 30
Hi,

Will it stop 1st apache ?

As in my case I need both the instances running.

Thanks
Rajan
 
Old 12-07-2012, 02:38 PM   #7
eSelix
Senior Member
 
Registered: Oct 2009
Location: Wroclaw, Poland
Distribution: Arch, Kubuntu
Posts: 1,246

Rep: Reputation: 309Reputation: 309Reputation: 309Reputation: 309
No, why? Both instance would have different config files and different pid files.
 
Old 12-08-2012, 01:01 AM   #8
rajaniyer123
Member
 
Registered: Feb 2004
Location: BARODA, GUJARAT
Posts: 259

Original Poster
Rep: Reputation: 30
Hi,

Thanks for help.

It is working now.

Thanks
Rajan
 
  


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
using Apache as a front end to a running Tomcat instance tkmsr Linux - Server 4 07-20-2010 10:32 AM
Apache-ajp Proxy Balancer: request is not switching from one instance to another singh.lovelesh Linux - Server 0 10-08-2009 03:35 AM
run multiple instance of daemon httpd (Apache) abhijit_mohanta Linux - Networking 2 09-11-2009 08:15 AM
make_sock: could not bind to address why i cant start my apache instance rajamanickam Linux - Newbie 1 06-09-2008 04:31 PM
running 2 instance of apache in one box suprateemdas Linux - Networking 1 02-23-2006 08:17 AM


All times are GMT -5. The time now is 10:02 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration