Navigation Menu

Skip to content

Commit

Permalink
apache24: deliver only 64-bit version
Browse files Browse the repository at this point in the history
  • Loading branch information
pyhalov committed Mar 1, 2019
1 parent 4d4f513 commit 023b791
Show file tree
Hide file tree
Showing 14 changed files with 193 additions and 745 deletions.
43 changes: 8 additions & 35 deletions components/web/apache24/Makefile
Expand Up @@ -24,6 +24,7 @@ include ../../../make-rules/shared-macros.mk

COMPONENT_NAME= apache2
COMPONENT_VERSION= 2.4.38
COMPONENT_REVISION= 1
COMPONENT_PROJECT_URL= http://httpd.apache.org/
COMPONENT_SRC_NAME= httpd
COMPONENT_SRC= $(COMPONENT_SRC_NAME)-$(COMPONENT_VERSION)
Expand All @@ -45,23 +46,6 @@ COMPONENT_PREP_ACTION +=($(CP) mod_auth_gss/mod_auth_gss.c $(@D)/modules/aaa);
COMPONENT_PREP_ACTION +=($(CP) mod_auth_gss/mod_auth_gss.html $(@D)/docs/manual/mod);
COMPONENT_PREP_ACTION +=(cd $(@D); autoreconf);

VARIANT_PREFORK = $(BUILD_DIR)/prefork
VARIANT_WORKER = $(BUILD_DIR)/worker

VARIANTS = $(VARIANT_WORKER) $(VARIANT_PREFORK)

BUILD_32 = $(VARIANTS:%=%/$(MACH32)/.built)
BUILD_64 = $(VARIANTS:%=%/$(MACH64)/.built)

INSTALL_32 = $(VARIANTS:%=%/$(MACH32)/.installed)
INSTALL_64 = $(VARIANTS:%=%/$(MACH64)/.installed)

$(VARIANT_PREFORK)/$(MACH64)/.configured: BITS=64
$(VARIANT_WORKER)/$(MACH64)/.configured: BITS=64

$(VARIANT_PREFORK)/%/.configured: CONFIGURE_OPTIONS += --with-mpm=prefork
$(VARIANT_WORKER)/%/.configured: CONFIGURE_OPTIONS += --with-mpm=worker

CFLAGS += -DSSL_EXPERIMENTAL -DSSL_ENGINE

# pipefail wouldn't allow APR-util version check
Expand All @@ -70,6 +54,7 @@ CONFIGURE_ENV += SHELLOPTS=
CONFIGURE_PREFIX = /usr/apache2/2.4

CONFIGURE_OPTIONS += --enable-mods-shared=all
CONFIGURE_OPTIONS += --enable-mpms-shared=all
CONFIGURE_OPTIONS += --enable-so
CONFIGURE_OPTIONS += --enable-suexec
CONFIGURE_OPTIONS += --with-suexec-caller=webservd
Expand All @@ -92,29 +77,17 @@ CONFIGURE_OPTIONS += --enable-ldap
CONFIGURE_OPTIONS += --enable-ssl
CONFIGURE_OPTIONS += --enable-exception-hook
CONFIGURE_OPTIONS += LTFLAGS="--silent --tag=CC"
CONFIGURE_OPTIONS.32 += --enable-layout=Solaris-Apache2
CONFIGURE_OPTIONS.64 += --enable-layout=Solaris-Apache2-$(MACH64)
CONFIGURE_OPTIONS.64 += CC="$(CC) -m64"
CONFIGURE_OPTIONS.32 += --with-apr=/usr/apr/bin/apr-1-config
CONFIGURE_OPTIONS += --enable-layout=Solaris-Apache2
CONFIGURE_OPTIONS += CC="$(CC) -m$(BITS)"
CONFIGURE_OPTIONS.64 += --with-apr=/usr/apr/bin/$(MACH64)/apr-1-config
CONFIGURE_OPTIONS.32 += --with-apr-util=/usr/apr-util/bin/apu-1-config
CONFIGURE_OPTIONS.64 += --with-apr-util=/usr/apr-util/bin/$(MACH64)/apu-1-config

PATH=$(SPRO_VROOT)/bin:/usr/bin:/usr/gnu/bin

build: $(BUILD_32_and_64)

AP_CONFIG_LAYOUT_H=include/ap_config_layout.h
build: $(BUILD_64)

install: $(INSTALL_32_and_64)
install: $(INSTALL_64)
# Some files installed in proto area need to be fixed.
$(KSH93) Solaris/customization.sh $(PROTO_DIR) $(MACH64)
# Common header files for 32 and 64 bit variants are needed.
/usr/bin/diff -D __$(MACH64) \
$(VARIANT_PREFORK)/$(MACH32)/$(AP_CONFIG_LAYOUT_H) \
$(VARIANT_PREFORK)/$(MACH64)/$(AP_CONFIG_LAYOUT_H) \
> $(PROTO_DIR)$(CONFIGURE_PREFIX)/$(AP_CONFIG_LAYOUT_H) ; \
$(TOUCH) $(BUILD_DIR)
$(KSH93) Solaris/customization.sh $(PROTO_DIR)
$(TOUCH) $(BUILD_DIR)

test: $(NO_TESTS)

Expand Down
165 changes: 73 additions & 92 deletions components/web/apache24/Solaris/apache2.1m.sunman
@@ -1,6 +1,6 @@
'\" te
.\" Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved.
.TH apache2 1M "May 2011" "SunOS 5.11" "System Administration Commands"
.TH apache24 1M "Mar 1, 2019" "SunOS 5.11" "System Administration Commands"
.SH NAME
apache24 \- Apache HTTP Server Version 2.4 overview
.SH SYNOPSIS
Expand All @@ -17,8 +17,28 @@ loadable server modules, some additional support utilities, configuration
files, and documentation.
.sp
.LP
Both 32-bit and 64-bit versions of the servers are installed. It also
includes two of the most popular MPMs - Prefork and Worker.
Note Apache 2.4 is 64-bit only.
.sp
Apache 2.4 can be enabled by authorized user within the service
management facility (SMF), using the following fault management
resource identifier (FMRI):
.sp
.in +2
.nf
svc:/network/http:apache24
.fi
.in -2
.sp
Available SMF properties are listed in the following table:
.sp
.TS
allbox;
cw(2.750000i)| cw(2.750000i)
lw(2.750000i)| lw(2.750000i).
SMF Property Name Value
httpd/MPM event (default), prefork or worker
httpd/startup_options valid apachectl options
.TE
.SH FILES
.sp
.LP
Expand All @@ -36,13 +56,6 @@ to \fB"MAJOR.MINOR"\fR. For example, \fB/usr/apache2/2.4/*\fR.
.TP
.ie t \(bu
.el o
\fB[isainfo]\fR represents the output of \fBisainfo
-n\fR on 64-bit platform.
.RE
.RS +4
.TP
.ie t \(bu
.el o
To find the current version of Apache 2 installed on your
machine, type the following command:
.sp
Expand All @@ -65,6 +78,10 @@ $ /usr/apache2/[version]/bin/apachectl -v
.RS 4n
Contains server configuration files. A newly-installed server
contains a default \fBhttpd.conf\fR file. This is the main configuration file.
.sp
If there is need to use different main configuration file (e.g. to run
multiple Apache 2 instances), it's possible by providing Apache '-f'
option via SMF property httpd/startup_options.
.RE

.sp
Expand All @@ -78,10 +95,7 @@ contains a default \fBhttpd.conf\fR file. This is the main configuration file.
Contains additional server configuration files.
.sp
By default, server will load all the \fB\&.conf\fR files
placed under this directory. It also has 2 additional \fB\&.load\fR configuration
files-\fBmodules-32.load\fR and \fBmodules-64.load\fR which
contain \fBLoadModule\fR directives for loading the 32 and 64-bit
bundled Apache 2 modules respectively.
placed under this directory.
.RE

.sp
Expand All @@ -95,6 +109,11 @@ bundled Apache 2 modules respectively.
File for specifying the environment settings which the server uses at
startup. This is the user-editable version of the
/usr/apache2/[version]/bin/envvars file.
.sp
Note that this is default path to envvars file only in case where main
configuration file is in directory /etc/apache2/[version]/. If this
is not the case Apache 2 will look for envvars file in the same
directory where is main configuration file.
.RE

.sp
Expand Down Expand Up @@ -160,28 +179,14 @@ the file to \fBconf.d\fR directory and modify as per the need.
.ad
.sp .6
.RS 4n
Contains the 32-bit httpd (Prefork MPM) and httpd.worker (Worker
MPM) executable as well as other utility programs.
.RE

.sp
.ne 2
.mk
.na
\fB\fB/usr/apache2/[version]/bin/[isainfo]/\fR\fR
.ad
.sp .6
.RS 4n
Contains the 64-bit httpd (Prefork MPM) and httpd.worker (Worker
MPM) executables as well as other utility programs.
Contains the main httpd executable as well as other utility programs.
.RE

.sp
.ne 2
.mk
.na
\fB\fB/usr/apache2/[version]/bin/envvars\fR\fR
\fB\fB/usr/apache2/[version]/bin/[isainfo]/envvars\fR\fR
.ad
.sp .6
.RS 4n
Expand Down Expand Up @@ -223,20 +228,7 @@ various optional server extensions with \fBapxs(8)\fR.
.ad
.sp .6
.RS 4n
Contains 32-bit loadable modules (DSOs) supplied with the
server.
.RE

.sp
.ne 2
.mk
.na
\fB\fB/usr/apache2/[version]/libexec/[isainfo]/\fR\fR
.ad
.sp .6
.RS 4n
Contains 64-bit loadable modules (DSOs) supplied with the
server.
Contains loadable modules (DSOs) supplied with the server.
.RE

.sp
Expand All @@ -253,39 +245,6 @@ Add this directory to your MANPATH to read the Apache 2 man pages. See
Notes.
.RE

.sp
.ne 2
.mk
.na
\fB\fB/usr/apache2/[version]/lib/\fR\fR
.ad
.sp .6
.RS 4n
Contains the 32-bit Apache 2 core libraries.
.RE

.sp
.ne 2
.mk
.na
\fB\fB/usr/apache2/[version]/lib/[isainfo]/\fR\fR
.ad
.sp .6
.RS 4n
Contains the 64-bit Apache 2 core libraries.
.RE

.sp
.ne 2
.mk
.na
\fB\fB/usr/apache2/[version]/lib/perl/\fR\fR
.ad
.sp .6
.RS 4n
Contains the 32-bit modules and library files used by the \fBmod_perl\fR extension to Apache 2.
.RE

.sp
.ne 2
.mk
Expand Down Expand Up @@ -335,23 +294,9 @@ This should not be changed.
.ad
.sp .6
.RS 4n
Place holder for 32-bit user Apache 2 modules.
.sp
Any 32-bit modules which are added using \fBapxs(8)\fR are
copied into this directory.
.RE

.sp
.ne 2
.mk
.na
\fB\fB/var/apache2/[version]/libexec/[isainfo]/\fR\fR
.ad
.sp .6
.RS 4n
Place holder for 64-bit user Apache 2 modules.
Place holder for user Apache 2 modules.
.sp
Any 64-bit modules which are added using \fBapxs(8)\fR are
Any modules which are added using \fBapxs(8)\fR are
copied into this directory.
.RE

Expand Down Expand Up @@ -383,6 +328,42 @@ The location of the cache can also be changed by changing the proxy
configuration in the \fBhttpd.conf\fR file.
.RE

.SH EXAMPLES
.LP
\fBExample 1 \fRTo switch to worker MPM type
.sp

.in +2
.nf
# \fBsvccfg -s apache24 setprop httpd/MPM=worker\fR
# \fBsvcadm refresh apache24\fR
# \fBsvcadm restart apache24\fR
.fi
.in -2
.sp

.LP
\fBExample 2 \fRCreate new SMF apache instance
.sp
.LP
This expects that valid configuration exists in
/var/myapache/httpd.conf and it has altered all relevant directives
against default apache instance (e.g. PidFile, Listen, DocumentRoot,
ErrorLog and CustomLog).
.sp
.in +2
.nf
# \fBcp /lib/svc/manifest/network/http-apache24.xml my-apache24.xml\fR
.sp
Edit my-apache24.xml and rename instance name to my-apache24.

# \fBsvccfg import my-apache24.xml\fR
# \fBsvccfg -s my-apache24 setprop httpd/startup_options=\\("-f" "/var/myapache/httpd.conf"\\)\fR
# \fBsvcadm refresh my-apache24\fR
.fi
.in -2
.sp

.SH SEE ALSO
.sp
.LP
Expand Down
Expand Up @@ -18,14 +18,8 @@
#
# CDDL HEADER END
#

#
# Copyright (c) 2009, 2011, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
#

<IfDefine 64bit>
LoadModule ::MODULE_NAME::_module libexec/64/mod_::MODULE_NAME::.so
</IfDefine>
<IfDefine !64bit>
LoadModule ::MODULE_NAME::_module libexec/mod_::MODULE_NAME::.so
</IfDefine>
solaris.smf.manage.apache:RO::Manage Apache HTTP Server Service States::
solaris.smf.value.apache:RO::Change Values of Apache HTTP Server Service Properties::

0 comments on commit 023b791

Please sign in to comment.