Re: Configuring multiple instance of apache on solaris

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jun 9, 2009 at 3:22 AM, Boyle Owen<Owen.Boyle@xxxxxxxxxxxxx> wrote:
>> -----Original Message-----
>> From: Sayed Wali [mailto:sayed.wali@xxxxxxxxx]
>> Sent: Monday, June 08, 2009 11:54 PM
>> To: users@xxxxxxxxxxxxxxxx
>> Subject:  Configuring multiple instance of
>> apache on solaris
>>
>> Hi ,
>>
>> I have a problem that I am hoping one you have seen before....
>>
>> I am trying to run multiple instances of Apache V. 2.2.8 on Solaris
>> 10.  I have everything setup. i.e. Different configuration files for
>> each instances, with different port numbers, lock file, PidFile, and
>> ScoreBoardFile. However, when I try to start instance, it won't accept
>> the "PidFile" param from the config file. Hence I am unable to start
>> multiple instances. If I start each instance individually, all 3
>> instances come up ok, but they all place the PidFile in
>> /var/run/httpd.pid. No matter what I do, I cannot seem to force the
>> config to use different pid file. Any help?
>
> Your config looks OK... So usually when directives seem to get ignored,
> it's because the config is not really being read.

The weird part is the some directives are being read from the instance
specific config files. It just doesn't read the PidFile and LockFile
directive.  i.e I have defined "ScoreBoardFile", ErrorLog, and
CustomLog which all get created in proper directories.

One interesting note: I checked out the modules that are loaded during
the config.... I don't see "WORKER" modules. The server was compiled
using MPM "PreFork" module. Do you think I need compile using WORKER
MODULE?

# ./httpd -l

 Compiled in modules:
 core. c
 prefork.c
 http_core.c
 mod_so.c

# ./httpd -V
Server version: Apache/2.2.8 (Unix)
Server built: Jul 1 2008 16:33:16
Server's Module Magic Number: 20051115:11
Server loaded: APR 1.2.12, APR-Util 1.2.12
Compiled using: APR 1.2.12, APR-Util 1.2.12
Architecture: 32-bit
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="/opt/apache2.2.8"
-D SUEXEC_BIN="/opt/apache2.2.8/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"

>
> How, exactly, are you starting apache? Each instance should start
> separately with a defined config file, eg:
>
> /path/to/apache/bin/httpd -f /path/to/config/instance_1.conf

Correct. I have modified the HTTPD in apachectl control script to use
the -f option with full path to the conf file for each instance.

HTTPD=' /opt/apache2.2.8/bin/httpd -f /opt/apache2.2.8/config/instance_1.conf'

>
> (probably this will be inside a control script).
>
> Apart from that;
>
> - what does it say in the error log?

There is nothing weird in the error logs. I have started apache in
debug mode but it doesn't give me any errors.

> - do any configs have included content from other files?

Yes. Each instance specific config has 2 includes to two virtual
hosts. I have defined full paths to them.

i.e. First Virtual host:
<VirtualHost *>
 ServerName test-b.www.club.com
 ServerAlias origin-test-b.club.com
 DocumentRoot /opt/apache2.2.8/data/club1
 CustomLog "/var/adm/apache2.2.8/instance1/testb_log" common

Second Virtual host:
<VirtualHost *>
 ServerName test-b.www.club2.com
 ServerAlias origin-test-b.www.clubs2.com
 ServerAlias www.clubs2.com
 DocumentRoot /opt/apache2.2.8/data/club2

>
> Rgds,
> Owen Boyle
> Disclaimer: Any disclaimer attached to this message may be ignored.
>
>>
>> I know its not permissions issue because it creates errorlogs and
>> scoreboardfile successfully.
>>
>>
>> Here is my instance 1.conf:
>>
>> ServerRoot "/opt/code/apache2.2.8"
>>
>> Listen 80
>> ServerName localhost:80
>> ScoreBoardFile /var/adm/apache2.2.8/inst1/apache_runtime_status
>> LockFile /var/adm/apache2.2.8/inst1/inst1.lock
>> PidFile /var/adm/apache2.2.8/inst1/inst1.pid
>>
>>
>>
>>
>> Here is my instance 2.conf:
>>
>> ServerRoot "/opt/code/apache2.2.8"
>>
>> Listen 81
>> ServerName localhost:81
>> ScoreBoardFile /var/adm/apache2.2.8/inst2/apache_runtime_status
>> LockFile /var/adm/apache2.2.8/inst2/inst2.lock
>> PidFile /var/adm/apache2.2.8/inst2/inst2.pid
>>
>>
>> Here is my instance 3.conf:
>>
>> Listen 82
>> ServerName localhost:82
>> ScoreBoardFile /var/adm/apache2.2.8/inst3/apache_runtime_status
>> LockFile /var/adm/apache2.2.8/inst3/inst3.lock
>> PidFile /var/adm/apache2.2.8/inst3/inst3.pid
>>
>>
>>
>> Any help or suggestions are very much appreciated.
>>
>> Thanks,
>> Sayed
>>
>> ---------------------------------------------------------------------
>> The official User-To-User support forum of the Apache HTTP
>> Server Project.
>> See <URL:http://httpd.apache.org/userslist.html> for more info.
>> To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
>>    "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
>> For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx
>>
>>
>
> This message is for the named person's use only. It may contain confidential, proprietary or legally privileged information. If you receive this message in error, please notify the sender urgently and then immediately delete the message and any copies of it from your system. Please also immediately destroy any hardcopies of the message.
> The sender's company reserves the right to monitor all e-mail communications through their networks.
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
>   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
> For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx
>
>

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux